How to Convert Lead Compensator Output to PWM for Hexacopter Height Control?

  • Thread starter huntflex
  • Start date
  • Tags
    Output
In summary, the conversation is about designing a lead compensator for a hexacopter to control height using PWM output. The user already has a scaling of a=0.1956 N/PWM and knows that 143 PWM is needed for hover thrust. The block diagram shows a feedforward value is needed but the user is unsure of what value to use. The discussion then turns to the units of PWM and it is discovered that the Arduino board uses a range of 0-255 to represent duty cycle.
  • #1
huntflex
27
0

Homework Statement



Hello, I'm not looking for an answer to my problem, just some hints. Any help would be greatly appreciated.
I am required to control a hexacopter, so I'm designing a lead compensator to control the height, it should be able to counteract the pull of gravity. So far I have designed it, but my problem is that I need its output to be in PWM form.
I already have a scaling which is a= 0.1956 N/PWM, it is also given that a value of 143 PWM will generate hover thrust.(These constants are found from tests on the motor, and are for all 6 motors).

Homework Equations


I realize that the feedfwd (see block diagram) should be some value, but I don't know what.


The Attempt at a Solution



Attached is a snapshot of the block diagram.

Thanks for any help :)
 

Attachments

  • Capture.jpg
    Capture.jpg
    11.2 KB · Views: 407
Physics news on Phys.org
  • #2
I've long since forgotten my control theory but what does 143PWM mean? What are your units for PWM in a= 0.1956 N/PWM ?

Is it a = 0.1956 Newtons/percent ?

If the pulse width modulation can vary from 0% to 100% how can you have 143%
 
  • #3
That is actually a very good question, what I can see from the data that was given to me is that the transfer function for the motor was derived by subjecting it to steps from 150 PWM to 170 PWM, from there a linear regression could be made, and from there it is derived that the slope is a = 0.1956 Newton/PWM. Which means for every PWM sent in, 0.1956 Newton is added to the system.
 
  • #4
I just found out, that it's how the Arduino board works, you write 0-255, where 0 is 0% duty cycle, and 255 is 100 % duty cycle
 
  • #5


Hello, it sounds like you are on the right track with your lead compensator design. To convert the output of your lead compensator into PWM form, you will need to use the scaling factor you have already calculated (a = 0.1956 N/PWM). This will allow you to convert the desired thrust output (in Newtons) into the corresponding PWM value.

As for the feedforward value, this will depend on your specific system and the requirements for your hexacopter's height control. It will likely involve some trial and error to find the optimal feedforward value, as it will need to be adjusted based on the weight and other characteristics of your hexacopter.

I suggest starting with a conservative estimate for the feedforward value and then fine-tuning it through testing and experimentation. Additionally, you may want to consider implementing a closed-loop control system to further improve the accuracy and stability of your hexacopter's height control. Good luck with your project!
 

1. What is the output of a lead-compensator?

The output of a lead-compensator is a control signal that is used to adjust the behavior of a system. It is typically a voltage or current that is fed into the system to achieve a desired response.

2. How does a lead-compensator improve system performance?

A lead-compensator improves system performance by increasing the stability and reducing the settling time of the system. It also improves the system's ability to reject disturbances and track reference signals.

3. What are the key components of a lead-compensator?

The key components of a lead-compensator are a resistor, a capacitor, and an operational amplifier. These components work together to shape the output signal in a way that improves the system's response.

4. How is the output of a lead-compensator calculated?

The output of a lead-compensator is calculated using the transfer function of the system and the transfer function of the lead-compensator. The transfer function of the lead-compensator is typically designed to introduce a phase lead in the system's response, which improves stability and performance.

5. What are some common applications of lead-compensators?

Lead-compensators are commonly used in control systems, such as in industrial processes, robotics, and aircraft control. They are also used in audio and video systems to improve the frequency response and reduce distortion.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
796
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
Replies
1
Views
3K
  • Electrical Engineering
Replies
17
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Replies
13
Views
5K
Back
Top