Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with cascade PID
11-29-2016, 10:15 AM
Post: #1
Problem with cascade PID
Hi everyone,
I have a project of balancing robot. I've read code of B-RObot. But I can't understand Cascade PID.
1. What's the unit of SPEED in this code.
PHP Code:
actual_robot_speed_Old actual_robot_speed;
    
actual_robot_speed = (speed_M1 speed_M2) / 2// Positive: forward

    
int16_t angular_velocity = (angle_adjusted angle_adjusted_Old) * 90.0// 90 is an empirical extracted factor to adjust for real units
    
int16_t estimated_speed = -actual_robot_speed_Old angular_velocity;     // We use robot_speed(t-1) or (t-2) to compensate the delay
    
estimated_speed_filtered estimated_speed_filtered 0.95 + (float)estimated_speed 0.05;  // low pass filter on estimated speed 
2. The OUTPUT of SPEED CONTROLLER is the SET POINT of STABLITY CONTROLLER. But, the process variable of STABILITY is the tilt angle, and calculated by degree. So, Do Setpoint and process variable have the same unit?

Please help me explain those problems.
Thank you!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)