how can i imploy pid on a mass spring damper showing a car model in m file using oe45
3 views (last 30 days)
mean when i make an equation i.e. m*v(dot)+bv=u and solve it using ode45 in m file how can i employ PID there for a cruise contol. I can find the same solution on net in crise control tutorials but they use either transfer function or state space, but i dnt find the same solution using ode45. can any body suggest how to use PID with ode45.two m files are listed below. please any body can suggest how to controll the out put using a PID controller for a cruise control
first m file
2nd m file to run the above one is as:
Arkadiy Turevskiy on 18 Mar 2013
It would be easier to do with state space or a transfer function, like you saw in the tutorials. If you want to use ode45, you will have to formulate the differential equations for the system with PID included.