Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Inverted pendulum tuning Contrler with MATLAB

Status
Not open for further replies.

Jean-Pierre du Plessis

Newbie level 6
Joined
Dec 6, 2010
Messages
11
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,398
Hi,

I was wondering if anyone can help. I constructed an inverted pendulum for my final year project. Time is running out and I am struggling to get it properly balanced. The system consists of the following.
I use an POT to measure the angle and an optical encoder to measure the cart position. After the PID controller output I send the output to the PWM register to drive the dc motor. The value of my error is between 1 and about 15 for max error, larger than that the system can’t recover. Then my output to my motor PWM is between 300 and 1600. The motor only starts moving at values larger than 300. I am also able to output the results to MATLAB via serial communication.

I have it balancing a bit without position control, but its not good enough.

I tried using the system identification tool in MATLAB. My input to this tool was the measured ADC value, that can range anywhere between 0 and 1023, but the SP is around 500 so if it balance a bit the error is not too large. And for the output I send the PID controller output that is limited to 1600 and 300. These values were recorded by only applying Kp value large enough to balance the pendulum a bit. This tool then gives me a transfer function that I used to do auto PID tuning with the SISO tool. The values from the tool is very small and won’t be able to work.

Any advice or maybe suggestions where I went wrong with matlab. If more information is needed I will provide it. But please just ask and please help me?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top