0

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?

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

EDIT:PLEASE CHECK THE IMAGE(it corresponds to the given equation): enter image description here

sheetansh
  • 355
  • 1
  • 3
  • 16

1 Answers1

1

A 1st order analogue integrator is usually made from an op-amp and has two components that define the integration constant; a resistor and a capacitor: -

enter image description here

The picture above shows the equivalent digital implementation.

T is the sampling rate and C and R are the same as in the analogue integrator.

Note the negative sign in the first gain block - this is only needed if exactly mimicking the behavior of an analogue integrator (which naturally inverts).

To make a 2nd order integrator cascade two of these "circuits".

Andy aka
  • 456,226
  • 28
  • 367
  • 807