I have a vehicle (I bought it and it proprietary and I have no information about any internals) which I want to integrate into my simulation environment. So far I have a physical model of it which I gained by driving around recording data and building a physical model from it. Now I'm at the point where I want to model the internal controller. I though that it might use a PID but I think now that something else is used instead. First I ran (around 30k) simulation with the physical model as basis to come up with the PID constants. In the simulations I let the vehicle move around the way as I did with the real vehicle and compared the response of my controller with the measured response of the real controller. In the image below you see the best PID which my brute force parameter search came up with.

enter image description here

As you can see my PID (red line) does not respond as fast as the real controller (green line) So my question is now:

What kind of controller could have been used here ? And how can I model it ?

It is definitive not a PID. Ten year ago I had lectures on control and system theory but since then I did not need to build a controller so I have not much experience. I looked into the literature and found the Lead–lag compensator which look promising but I have no idea where to start or how to implement it. To get the constants here I again can run simulations in a try an error manor. Maybe another different approach has been used but I have no idea what.

  • $\begingroup$ Are you trying to build a model of the controller that is implemented, or is your goal to come up with a different/better control strategy? And what are the inputs and outputs here -- thrust and speed? $\endgroup$ – Max May 24 '17 at 16:48
  • $\begingroup$ The controller handled the angular velocity and I'm trying to build a model of the real controller to integrate it into our simulation environemt. We want to have a realistic simulation of the real vehicle $\endgroup$ – Westranger May 24 '17 at 19:33
  • $\begingroup$ Can you provide more information about your measurements. What did you measure and how did you measure (i.e. what are you're input and output signals)? Furthermore I would like to know the currently used transfer functions. $\endgroup$ – useless-machine Aug 18 '17 at 17:50

Without knowing the transfer function of the plant you try to control it might be that a PID-controller would suffice, but for now I will assume this is not the case. Assuming that your graph is a step response; I am however a little confused by the drop back to zero, since there all systems seem to exert the same behavior. For the initial step the system with your PID-controller has a lower rise-time and settling-time which would indicate that the real system has a higher bandwidth, which can be achieved using a higher gain. Also the system with your PID-controller has a slight oscillation, which would indicate that your system does not have the same amount of phase/gain/modulus margin. You can use a lead–lag compensator for this by placing the pole and zero of the lead–lag compensator at 3 times the bandwidth and 1/3 times the bandwidth respectively. This has the affect that you get more phase lead near the bandwidth without change the magnitude of the openloop much and thus increasing your phase margin. Increasing your phase margin usually also increases your modulus margin and depending on the situation also the gain margin (if you already have sufficient gain margin it won't change much).

  • $\begingroup$ Thanks for yor answer. I'm on it and keep you informed about my progress. The decline at the and is the second controller which is wrapped around the first one and which handles deaccelleration $\endgroup$ – Westranger May 24 '17 at 19:36

By your description, it happens that you got data from your vehicle running and build a model based on it. If you did it, you got the closed loop model, as you mentioned it has a controller (see the image bellow). But what you need is the plant (process) model. To get it, you need to turn off the vehicle embedded controller and take the samples to build your model.Closed loop system

*Image source: Hobbybotics Reflow Controller V8.03


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.