Simple Working Principle of the UAV Autopilot-Take YS09 as an Example
Keep writting and uploading.
0)Working principle of the UAV autopilot-take YS09 as an example:
1)YS09 UAV Autopilot Specs.pdf ：
3)Brief English Manual(draft1):
4)Ground test and failure solving-draft1:
5)GCS using Google Earth plugin:
Part1：Working Principle（1）- Servo Control
Diagram1：PWM Signal and Servo COntrol
1)PWM signal is at low signal level usually,but it will change to high signal level every 2ms time,and lasts for 1~2 ms,that is ,the pause width is 1~2 ms.
2)The arm of the servo will turn to a certain angle according to the pause width of the PWM signal recieved by the servo.
3)1ms<->+45º(Max angle turning CCW),2ms<->-45º(Max angle turning CW).
4)The control surface will turn to a certain angle dragged by the servo arm through the rod.
5)+45º<->+20º(Max angle of the control surface turning CCW),-45º<->-20º(Max angle
Of the control surface turing CW).
6)1.5ms<->0º of servo arm turning angle<->neutral point of the control surface.
7)The pause width values,the arm turning angle values,and the control surface turning angle values ,are all in symmetrical distribution.
8)The given number is for reference only.Please check out the related user manual and the detailed user settings of the servo in the real flight.
9)BTW,change the hole position of the servo (or rod length),and the max turing angle of the arm will be changed too.
10)ESC is controlled by the PWM signal as well,it will change the turning speed of the motor according to different pause width by outputing related volts to the motor.
11)Sth must be done to the RC Tx before the flight using YS09 autopilot system:cancle all the mixing settings,and set it to fixed wing mode.Cancle all the reverse settings in the servo channels(AIL/ELE/THR/RUD),and do the reverse settings in the GCS only.To the F/S item:Set to the auto mode in the working modes changing channel and leave the other channels without any settings.Test the F/S setting in the ground:Shut down the power of the RC Tx,and the GCS will tell you that the current working mode is auto mode.
12)Servo control and attitude control
On one hand,change the turn angle of the servo arm,and the control surface turn angle will be changed,and the stress analysis situation of the aircraft will be changed as well,then,the turn angle of the aircraft in diffent axis will be changed to the related values,that is,the attitude and headingwill be changed.
On the other hand,the attitude and heading can be changed by changing the pause width of the PWM signal in different servo channels.That is ,the attitude control can be converted to servo control.
★Servo Control is the basic context of the autopilot control.Besides the flight servos(AIL/ELE/RUD/THR),there are other servos,such as the parachute servo and the gimbal servos.Their working principle is the same,that is,to make the autopilot output a certain pause-width PWM signal to the servo,and force the servo arm to turn to a certain angle,and drag a certain part of a certain device to move to a certain direction.
Diagram2：capture key servo positions
1)The important servos in this autopilot system includes:Flight servos (AIL /ELE /THR / RUD ) , Parachute servo and gimbal servos.
The parachute is tied to the airframe with some ropes.The folded parachute is placed in the cabin on the bottom of the ariframe near the tail.Usually,the cabin is locked by the servo arm.But the arm will move to the side and let go the door of the cabin when the autopilot outputs the open parachute signal to the parachute servo duiring the flight.The parachute will drop down.The motor will stop running before that,so the aircraft will drop to the ground and force the parachute to open facing the airflow moving upwards.If the altitude to open the parachute is the right one,then the aircraft can be landed safely.
The YS09 autopilot can control the two axis gimbal,one for the holizone (Pan servo),and the other for the vertical (Tilt servo).The Pan servo can turn from -180º(camera points to the tail) to 0 º(Camera points to the head).The Tilt servo can turn from 0º(Camera points to the ground) to 90º(Camera points to the head).
Ensure the airframe is in parallel with the ground while capturing the gimbal key positions.
4）The importance of capturing the key servo positions
The YS09 autopilot has 3 working modes:Manual mode,semi auto mode,and auto mode.Manual mode is for ground test mainly,auto mode is for the autonomous flight.The semi auto mode is not so important.Most of the important control functions are carried out in auto mode.
In manual mode,the operater can change the positions of the sticks,switchs,and knobs in the RC Tx,make it output PWM with different pause width,sending them to the RC Rx.The autopilot recieve the signals and transfer them to the servos after doing some sevo mixing operation if necessary,and the signals are almost the same to their original states.
In the auto mode (except the setting state),the autopilot will ignore all the servo control signals from the RC Tx,and control the servos via its internal “virtual RC Tx).The GCS sends out the advanced control commands,and upload them to the autopilot through the datalink.The autopilot will send out the suitable servo control signals after doing some intelligent analysis to the GCS commands.To output the right pause width PWM signal via the “virture RC Tx”,some necessary settings to related servo channels must be done prior to the formal flight,that is,we need to record the key servo positions of each channel first,and then we can use the autopilot to send out the accurate PWM signal just like what the RC Tx can do.
Diagram3:The layouts of the fixed wing aircraft
1）Normal:with AIL/RUD control surface, and two AIL control surface
2）Flywing:AIL and ELE mixing,with two Right Differential Servo
3）V tail:RUD and ELE mixing,with two differential servos
Diagram4：Simple Stress Analysis
1） The relationship between the airflow and the servo surface
①The motor makes the prop keep running,and force the aircraft to move forward.The airflow moves from the head of the aircraft to its tail.
②Rud surface moves up(relatived to the airframe) ,the overhead airflow will offer a force to push it backward and downward.
③Rud surface moves down(relatived to the airframe) ,the below airflow will offer a force to push it backward and upward.
④Rud surface moves to the left(relatived to the airframe) ,the overhead airflow will offer a force to push it backward and to the right.
⑤Rud surface moves to the right(relatived to the airframe) ,the overhead airflow will offer a force to push it backward and to the left.
2）The control surface movement and the aircraft movement in the normal layout
①ELE surface moves up,the force on it is down,so the head whirls up around the CoG.
②ELE surface moves down,the force on it is up,so the head whirles down around the CoG.
③RUD surface moves to the right,the force on it is to the right,so the head whirles to the right around the CoG.
④RUD surface moves to the left,the force on it is to the right,so the head whirles to the left around the CoG.
⑤The left AIL surface moves up,the force on it is down,so the left wing whirles down around the CoG,in the same time,the right AIL surface moves down,the force on it is up,so the right wing whirles up around the CoG.
⑥The left AIL surface moves down,the force on it is up,so the left wing whirles up around the CoG,in the same time,the right AIL surface moves up,the force on it is down,so the right wing whirles down around the CoG.
3）The control surface movement and the aircraft movement in the mixing layouts
①In the flying wing layot and the V tail layout,the situation is very samilar to that of the normal layout.
②In flying layout:The two differential servo surfaces will move up or move down in the same time when they are being used as a ELE surface.When they are being used ③as AIL surfaces,one will moves up when the other moves down in the same time.
In V tail layout:The two differential servo surfaces will move up or move down in the same time when they are being used as a ELE surface.When they are being used as a RUD surface, they will move to the left or to the right in the same time.
Diagram 5:The relationship between the RC Tx sticks and the servo surfaces
1)The signal channels of the RC Tx
①Usually,2 kinds of channels needed:the proportion channel and the switch channel.
②Normal RC Tx uses 1.5ms as the servo neutral position.Set the End point to -100-+100,then the pause width of the PWM signal will be in the range of 1ms-2ms.We take these settings as the normal ones in this system.
③AIL/ELE/RUD/THR stick belong to the proportion channel,can out PWM signals in 1ms-2ms pause width.
④Two way switch and three way switch belong to switch channel,can only output 3 kinds of PWM signals: 1ms pause width,1.5ms pause width,and 3 ms pause width.
⑤In normal situation,move the stick to the top,will output 2ms PWM signal,move to the middle,will output 1.5ms PWM signal,buttom<->1ms.
⑥In normal situation,move the stick to the right,will output 2ms PWM signal,move to the middle,will output 1.5ms PWM signal,left<->1ms.
2)The movement of the stick and the servo surface
①AIL stick moves to the left,the left AIL surface will whirl up and the right AIL surface will whirl down;AIL stick moves to the right,the right AIL surface will whirl up and the left AIL surface will whirl down.
②ELE stcik moves up,and the ELE surface will whirl down,ELE stick moves down,and the ELE surface will whirl up.
③RUD stick moves to the left,and the RUD surface will whirl to the left;RUD stick moves to the right,and the RUD surface will whirl to the right.
3）Servo Reverse setting
①RC Tx can set the servo reverse,so,it is possible that the RC Tx outputs 1ms(NOT 2ms) PWM signal when the stick move to the top.We need to reverse this channel.
②Different brands have diffenect reverse settings,different servos have different setup methold,so ,we need to uinity the reverse settings to some simple rules.
③The servo reverse operation is carried out in the GCS ,but not the RC Tx.
④Set the YS09 to manual mode,move the sticks to control the movements of the servos,and check if the GCS data is in the same pace of that of the sticks.See Diagram 5,the right sticks movements should be like these in the normal situation:RUD surface is in the middle,the ELE stcik is on the top,a little close to the middle,the AIL stick is in the left,a little close to the middle.The THR stick is in the middle.
Chech out and find out whitch channel is not right,and reverse it.If there is a check mark,cancle it,if not,make a check mark.
Finally,click the “reverse”button.
④If the stick and the GPS data aee fit with each other.Then check the control surface movement according to the “Note2” above.usually,if it is a normal layout,and everything should be Ok when the the stick and the GPS data aee fit with each other.But to a flying wing or a v tail,please check it out using “diagrame4->Note3”.If the situation is not right,eg.move the ELE stick and the two differential servo surface can not whirl to the same side in the same time.then the methold to deal with it is :Replace the connection of the two differential servos between them and the autopilot,or reverse the “mixing”channel.
Diagrame6:The right servo movements in auto mode(without position control)
1)In auto mode(note that the RC Tx can not control the AIL/ELE/RUD/THR).Suppose there is no any position control,then the autopilot will do the stabilization control,that is ,to keep the level flight state of the aircraft.If the aircraft wants to move to a unlevled position,then the autopolit will output a correction signal to the Roll/Pitch channel to resist this movement,till the aircraft is levled again.
2)The stabilization control is mainly take effect in the roll axis and the pitch axis.When the head is leaving the level position,the pitch stabilization control will take effect.When the wings are leaving the level postion,and the roll stabilization control will take effect.If the head and the wings are leaving the level position in the same time,then the autopilot will output the correction signals in the same time.Usually,the stabilization control in the two axis is separated to each other.The stabilization control will be converted to the related servo control.
Part2：Working principle (2) Position control
1)We should do the ground test before the formal flight.One important work is to check the sensor data.When the data connection is open,the telemetry data will be shown in the GCS in the forms of track,data and meters.These sensor data offer the results of the attitude measuring and position measuring,making the autopilot control the attitude and position in a accurate way.In the auto mode,the stabilization control and position control is the basic context of the autonomous flight control of the autopilot.
3)Keep the aircraft still on the ground,and the normal accelerometer data should beown acc is close to 1g,back/right acc should be close to 0,the static angle should be the same to the real attitude.
4)The vibration test:
The accelerometer is vibration-sensitive.We need to check the vibration damping performence before take off.Set to manual mode,move the THR stick to different positions (eg.top,higher,middle,lower,bottom),and keep it on each position for a while (eg,20s),the “Vib state” value should be 0 all the time,if not redo the vibration damping.Once this value is not 0 duiring the test,redo and re test,till it is 0 all the time.
5)The real baro altitude should be 0,jump in the range of -3meter to 3 meter.The real airspeed should change in the range of 0-30km/h.If not ,then zero the altitude and airspeed.
6)When the QTY of the located GPS satellite is equal to or more than 5,we consider the GPS location is finished.The long and lat should be the same to the local data,and the launch point will be marked with a small aircraft icon.Then the autopilot will start to calculat the formal attitude (Data Fusion with gyro data,GPS data, accelerometer data etc).
When the aircraft is on the ground,the accelerometer data should be very accurate,and the static angle got from the accelerometers should be accurate too.Compare it to the formal attitude data in the AI meter,if the difference is smaller than 5º(0º-4º),then we can consider that the gyro data is accurate enough,and the aircraft can be launched anytime.If not ,then zero the gyro.
7)The steps to zero the gyro:Click “init setup” button,and it will show “setting” in the flight mode,keep the aircraft still,and click the “zero gyro” menu in the tools item in the mebu bar.Then the “flight mode” will be changed to “gyro initializition”.Wait for about 1 minute,and the “flight mode” will be changed to “setting” again.That means the gyro initialization operation is finished.Click the “quit init setup” button to quit the setting state.
8)Four main reason make the gyro can not work normally
①The lattitude changes too much.eg:the autopilot is sold from Northern Hemisphere to Southern Hemisphere.
②The temperature difference is too big.eg,20ºC in door,and -10ºC outdoor.
③The hardware features changed for the big collision when landing.
④The hardware features changed for not used for a time too long.
Diagram2:attitude control and position control
Servo surface control (equal to servo control actually) is the base of the attitude control,and attitude control is the base of position control.
Actually,stabilization is a kind of attitude control.
In the autopilot system,the attitude control is converted to servo surface control through the PID control algorithm.
Suppose the head is up to 10º,and want it to move up to 30º,then,how to reduce the 20º difference,is the control mission of the autopilot.As we know before,the autopilot sends out PWM signal to ELE servo,and the arm of ELE servo will whirl and drag the ELE surface to rock up or down,then change the force situation of the aircraft (the attitude following to change).The pitch is known any moment,and the deviation is known in the same time,the thing the autopilot needs to do is to send out the suitable PWM signal to control the whirling of the ELE servo.This procedure needs time ,(that is ,there are some sub procedures),and there are some principles.
There is a change speed in every sun procedure,whitch is related to the P item of the PID control.The bigger the P,the faster the change speed.But there is a problem because of the fixed change speed,that is,it may not stop at the point of 30º,eg,the pitch is 28º at the end of the penultimate sub procedure,but the final pitch will be 32º,but not 30º.Then how to deal with it?One methold is to reduce the pitch to a more smaller number in anther procedure.The other is,to suppres the deviation of the 2º before that in the same control procedure from 10º to 30º.
Usually,there are two control directions,one is to avoid “too much”,the other is to avoid “too little”.D item is used for “too much”(but may cause “too little”),I item is used for “too little”(but may cause “too much”).
We do not talk about the details of the PID control,please check out the related reference materials by yourself.In this time,you know we can control the servo surface accurately via PID algorithm,and then to change the attitude accurately, that is enough for now.In most of the time,there is the servo control converted from the stabilization control only.But when there is position control,the related servo control will be added on that of the stabilization control to form the final effect of the servo control.
1)All the parameters uploaded to the autopilot will be saved forever,till be covered by the new uploaded values in this system.
2)Simple PID setting metholdIn auto mode)
1）We recommend you to use the default settings first,especially to beginniers.If the performence of the flight is not so good,then adjust some parts.P first,then D,Or P and D in the same pace,P up and D up,P down and D down.To I item,do not modify it if not necessary.If you have to adjust it,then modify it after P and D are modified.To one direction first,eg,up->up more->up more and more.If it can not work,then reverse the direction,down->down more->down more and more.
Step1:generate and upload a square path.Set a small altitude,eg,50 meter,so that you can watch the altitude changes.The distance between the first and the last waypoint should not be too big.The interval to other waypoints are better to set to 300 meter -400 meter.
Step2:Change to auto mode,and make the aircraft fly in the range of sight.
Step3:Check the stabilization performence.
Use the default parameters first.
In the AIL channel,P=95,I=5,D=8.In the ALT to ELE channel,P=95,I=3,D=8.Note there are “P/128” in each item,that is ,the biggest value of the P item is 128.BTW,the smallest value that can be input is 0.The same to the other.
Since the adjustment metholds are the same to pitch and roll,we talk about roll here only.
If the aircraft roll up and down in the roll axis all the time,then reduce P and D in the same time.DO NOT adjust I in normal conditions.If the stabilization performence is not good,that is ,when the aircraft is leaving the level position in the roll axis,and there is no any control effect from the autopilot to recover,then increase the P and D items in the same time.DO NOT adjust I in normal conditions.
Step4:Try to adjust the target altitude,and check the altitude control.
If the aircraft climbs/dives too fast,then increase the P item in the “ALT to Pitch”channel. If the head rocks too much when climbing/diving,then reduce the related D item (reduce P in the same time).Finally,if the aircraft can not reach the target altitude all the time,then increase the related I item.
★Here,increase P,is equal to increase the original pitch given in the beginning of the climbing.Check Dirgarm 2 to get the real meaning of the original pitch.Note,the original pitch can not be bigger than the preset “Max pitch up”.on the other hand,reduce P is equal to reduce the original pitch.If P=128,and the climbing speed is still too low,then you can increase the “Max pitch up”.But,do not set it to a too big value(eg, limit it to ≤30º).If not,the aircraft maybe crash because of stall.
Step5:Check the turning performence when the aircraft arrives at the waypoint.
“RUD/4HZ”,means the control rate of RUD channel is much smaller than the other channels.
If the turning speed is too low,then increase the related P item.Otherwise,reduce it.It the head rotates left and right all the time during the turning,then reduce the related D item (better to reduce the P in the same time).
★Here,increase P,is equal to increase the original roll given in the beginning of the turning.Check Dirgarm 2 to get the real meaning of the original roll.Note,the original roll can not be bigger than the preset “Max roll”.on the other hand,reduce P is equal to reduce the original roll.If P=128,and the turning speed is still too low,then you can increase the “Max roll”.But,do not set it to a too big value(eg, limit it to ≤45º).If not,the aircraft maybe crash because of rollover.
Step6:Check the path flight.
If the speed of changing to the path is too slow,then increase the P of the “offset correction” channel.Otherwise,reduce it.
If the head rotates left and right all the time when following the preset path,then reduce the P and D in the same time.
★Here,increase P,is equal to increase the original offset angle given in the beginning of the flight changing to the path.Check Dirgarm 2 to get the real meaning of the original offset angle.Note,the original offset angle can not be bigger than the preset “Max offset correction”.On the other hand,reduce P is equal to reduce the original offset angle.If P=128,and the changing speed is still too low,then you can increase the “Max offset correction”.But,do not set it to a too big value(eg, limit it to ≤45º).If not,the aircraft may not follow the patch because of the sideslip.
Last edited by yiny0730; Jan 12, 2012 at 02:39 AM.
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|Off Site||thread closed||Dan Matheson||Aircraft - Fuel - Engines and Accessories (FS/W)||0||Dec 21, 2011 12:34 PM|
|For Sale||Thread Closed||Dan Matheson||Aircraft - Fuel - Airplanes (FS/W)||0||Dec 19, 2011 04:18 PM|
|Discussion||So why was the thread closed?||Stamp||Site Chat||15||Dec 03, 2011 09:31 PM|
|Whoops!||Thread closed...||kdill2160||CAD/CAM||27||Sep 18, 2011 08:32 PM|
|Discussion||Continuation of the CCW thread that was closed.||wrightme||Life, The Universe, and Politics||41||Sep 15, 2011 02:16 AM|