fixed more imgs

master
parent f83fed940b
commit 938d5b5d64

@ -29,7 +29,7 @@ On the Witty, some values are more interesting to know. In the position of the p
The gyro values are more difficult to handle. By knowing the initial position and integrating the variations, we obtain the current position. But values are very noisy and need to be filtered.
### The MPU6050 Sensor on the Gy521 Module
![gy521](images/gy521.png?raw=true "GY521 module")
<center><img src="https://git.boxtec.ch/didel/Witty/raw/branch/master/docs/images/gy521.png" width="240"></center>
The Gy521 module accepts a voltage of 3 to 5V, which is necessary to develop at 5V and then navigate to 3.7V having possibly retouched the parameters.
The doc of the MPU6050 is scary with 120 control registers at first glance. In fact all these registers have a correct default value for our use, except one, necessary to wake up the circuit. Two other registers will be commented on later.
The module is I2C, we must add the pull-up resistor (4k7). We can ignore the 4 additional signals.
@ -51,7 +51,8 @@ Control theory uses beautiful mathematics and professional tools like MathLab an
We have to program the Witty with that constant idea: keep the soft compact and fast.
### Control principles
![regulator1](images/regulator1.png?raw=true "Regulator diagram") ![regulator2](images/regulator2.png?raw=true "Regulator flow")
<center><img src="https://git.boxtec.ch/didel/Witty/raw/branch/master/docs/images/regulator1.png.png" width="300"><img src="https://git.boxtec.ch/didel/Witty/raw/branch/master/docs/images/regulator2.png.png" width="300"></center>
Let us suppose, as for traditional balancing robot, we want to keep the Witty vertical. vertical. If he leans forward, he must be advanced. If the speed is proportional to the error (the angle) one has a setting P for proportional.
An effort, friction, the fact that Pegasus is not balanced initially, can prevent reaching the desired position; it's the static error. We add to correct a fraction of the integral of the error, therefore the sum of the differences between the desired position and the successive positions. It's component I, integration.
One can still worry about oscillations, and take into account the variation of the gap. It is the component D, derived.
@ -65,7 +66,7 @@ Kp and Ki are constants that will have to be determined experimentally, in the a
**U(t) = Kpe(t) + Kiint(e(t))**
### Sensor Noise
![sensornoise1](images/gy521.png?raw=true "Sensor noise")
![sensornoise1](images/sensor-noise.png?raw=true "Sensor noise")
To reduce the noise of the sensors, it is necessary to average and there are three simple ways to average, plus very complex techniques. The simple average sums up e.g. 4 measurements and gives a result 4 times less often, which is obviously not favorable. The sliding average measure the average of the previous 4 measures.
Weighted average give a weight to the stored measures, so it is possible to react faster or slower to the last measure, and get something like a low pass or high pass filter. See the web for details.
(our old document in French: [Moyenne.pdf](https://www.didel.com/Moyennes.pdf)).

Loading…
Cancel
Save