Sliding Mode Control - MATLAB

A

Thread Starter

Andrew

Hi

I'm an electrical engineering student trying to learn simulink and how to design a sliding mode controller. I posted before about my sliding mode controller for a gantry crane and it proved useful.

I need to simulate my design in MATLAB, preferably simulink, but I am having trouble. I have a block diagram in mind but I don't know how to access the states of the state space representation. If I use the state space block in simulink I only have access to the two outputs. The difficulty comes from the saturation function used in the non linear control.

This link shows the block diagram in mind. http://postimg.org/image/muv3lbkwv/.

I need help with the system model block, it's basically the last piece of the puzzle, then I can tune my design and implemented in the lab.

This is the link to my MATLAB code, it shows how I designed my K matrices and the state space matrices. http://pastebin.com/WZCTmh2K

Any help would be greatly appreciated!
 
Top