This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to write the equation sliding mode control to AMR Crotex M4 by LM4F232H5DQ

I want to know is how to apply mathematical equations to a program. For example, writing in the AMR for the PI controller , which is an example of the ' microchip Application note at AN908 in Figure 6 for example .

Who wants to know how to convert the AMR crotex M4F232 of mathematical equations is the programming language C to please those who have knowledge or have a sample to see. Please help me.

Variable in this equation is a constant.

This equation is the example I take the actual principles but how to convert this equation into C programs because of its Integrated with the dif and please help me.

This equation is the equation of sliding mode controller which includes addition, subtraction, Integrated and different. Would help convert this equation is not a programming language.

If you have any questions, please contact via e-mail now. 

e-mail: epi-group@hotmail.com

Yours truly

Sunan

  • I suggest using the IQmath library that is included in the Stellarisware and Tivaware releases.  Which TI part number are you using?

  • Thanks for the recommendationใ

    I'm use the TI part number is LM4F232H5DQ. 

    Interference get a lot more I need to use it.

    sunan.

  •  What are you speaking about?

    First equation appear as Proportional Integral control theory, (as in general) if applied to DC motor may control the torque ...

    the last one appear as finite integration result of some other term, may be this is the voltage sample driving something else in the chain? What about symbols appearing there?

     My doubt: are you understanding math and discrete math following to old analog theory after sampling theorem??

     If so then math behind the scenes is very simple and Integral just convert in some sort of addition of samples, sliding windows is just related to integrating interval where a finite samples are got from real analog world... Integral sign if you know math derive from Sigma as for infinite summation, in the discrete is so simple accumulating sum...

     A vector of samples and some simple operation on "sliding" samples take the integral result... Sliding require some circular buffer theory avoiding really move samples to slide in and out..

  • Dear. Roberto

    What I'm talking about is Converts mathematical equation from the above is a C language by any means.

    In order to be written into the LM4F232H5DQ.

    This way you would know how to or not. Help me.

    Thanks.

    Regards.

    Sunan.

  • sunan songjan said:

    What I'm talking about is Converts mathematical equation from the above is a C language by any means.

    In order to be written into the LM4F232H5DQ.

    This way you would know how to or not. Help me.

     HI, I cannot help you because problem is not solvable without knowing what you want to do with equations:

     I know mathematics and I can understand first is analog domain (continuous function and integrals of some UNKNOWN function IL, Sj(x)... This resemble normalized PI term where K is integral gain no more after that..

     Second polinomial seems  be some form of discrete integral solution but again more unknown term appear...

     To solve discrete domain control equation  need to best know control behind that, sampling interval quantization error and goal of..

     Where are these detail? I don't see so your problem still is unsolvable also if I understand math and I am able to code numeric computation solver....

     I am sorry I see no way if you do not specify full problem and analysis...

    I see you get from an microchip application, I don't like browse that site to see what equation can be, please specify what is your application and what you need, all can be more simple.