Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Morning and Good Day to all!!

I am trying to Model control for a Micro-controller which (under Real Time Development) does not support Continuous time solver. So, instead i have to use Discrete Time Solver. How do i replace SECOND ORDER INTEGRATOR with DISCRETE TIME INTEGRATOR? The equation i am modelling is a Second Order Differential Equation.

Equation: m.y" = F_coil - Ks.x -mg

where

y" = d^2(x)/dt

F_coil = ((ni)^2)/(2.g^2)

{ where n=number of turns

i=current

g=air gap

Ks = Spring Pre-load

x = distance travelled by the solenoid plunger }

m = mass of the plunger

g = gravitational constant

Intentionally this is easy using a second order integrator.But when i use the discrete time integrator the output is completely different. Continuous time Integrator Output: 0.067 Discrete Time Integrator Output: 3207

HOW DO I ACHIEVE THE SAME WITH DISCRETE TIME INTEGRATOR?

My Attempt: One of my ideas was to solve the Differential Equation with laplace transform, get the function which could replace the differential equation. Is this a right approach?
Also while solving the same i realised that F_coil is not a constant during the complete simulation period. F_coil is only constant for a given time step!!

I am grateful for any input and please tell me if you need anymore info!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900