.net barcode scanner sdk Program 28-2 Segment Adding a Proportional Gain Factor in Software

Drawing QR Code in Software Program 28-2 Segment Adding a Proportional Gain Factor

Program 28-2 Segment Adding a Proportional Gain Factor
Scanning QR Code JIS X 0510 In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
QR Code JIS X 0510 Drawer In None
Using Barcode drawer for Software Control to generate, create QR Code ISO/IEC18004 image in Software applications.
PUB Cog_FigGain repeat gain:=50+||PositionError
Recognizing Denso QR Bar Code In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
QR-Code Drawer In Visual C#.NET
Using Barcode printer for Visual Studio .NET Control to generate, create Quick Response Code image in .NET framework applications.
'power to motor 'loop 'gain eq goes here. Set at 50 plus 'the absolute value of the error.
Make QR Code In VS .NET
Using Barcode generation for ASP.NET Control to generate, create QR Code image in ASP.NET applications.
QR Code 2d Barcode Drawer In .NET
Using Barcode encoder for .NET framework Control to generate, create QR Code image in .NET applications.
Program 28-2 holds the motor on position. If you move it off position by turning the motor, it will move back to the set position when you let go of the motor. Note that because the error is added to the fixed gain of the amplifier, the motor turns harder as you get further away from the zero position. However, it is still possible that the motor may not return to the absolute zero position because of the way the fixed portion of the gain (if too low) is set up there is now a proportional factor but no integration of the gain value in this program. Note that the proportional factor could have a multiplier if we so desired (PotOne is not being used for gain control in this program). Next, we need to add integration. This is a bit tricky because we need to add it only when the motor is not keeping up with its target position and we need to reset the value to zero once we are at the expected position. Also it is still needed at the end of a move to make sure that the motor gets to its target position. This is because at the end of the move the proportional gain is small and it may not be enough to move the motor and load to its target position without the integration factor. We can add integration with the code segment shown in Program 28-3. It is very important for you to understand exactly how this algorithm works.
QR Code Generation In VB.NET
Using Barcode generation for VS .NET Control to generate, create QR Code image in Visual Studio .NET applications.
Drawing GTIN - 128 In None
Using Barcode maker for Software Control to generate, create GTIN - 128 image in Software applications.
Running DC MotoRs with AttACheD inCReMentAl enCoDeRs
Bar Code Creator In None
Using Barcode generation for Software Control to generate, create bar code image in Software applications.
Printing EAN 13 In None
Using Barcode drawer for Software Control to generate, create EAN13 image in Software applications.
Program 28-3
Create Code 128C In None
Using Barcode creator for Software Control to generate, create Code 128 image in Software applications.
Generate Code 3/9 In None
Using Barcode creation for Software Control to generate, create Code 39 image in Software applications.
Segment Adding a Proportional and Integration Factor
Monarch Creation In None
Using Barcode generation for Software Control to generate, create NW-7 image in Software applications.
Scanning Barcode In VS .NET
Using Barcode decoder for Visual Studio .NET Control to read, scan read, scan image in .NET applications.
PRI Cog_FigGain repeat 'loop if ||PositionError=<1 'if no error ' Integ:=0 'set the integration to zero Index:=0 'set the variable to zero Else 'Otherwise index:=index+1 'increment the index counter If index==5 ' Max index. The smaller this is the faster the integ integ:=integ+1 'increase the integrating function index:=0 'reset the index to 0 if integ > 2000 'set limit on integrated gain integ:=2000 'clamp its value. Max is 4095 gain:=8+||positionError+integ 'add it all up for the gain. gain:=gain <# MaxGain 'gain must be less than MaxGain {{ EXERCISES: Play with the equations in Cog_FigGain to see what happens to the motor response as you change the gain equations. The value of the maximum index sets how fast the integration proceeds. The lower the number the faster integ value increases. The integration max is clamped at 400 to keep you from cutting your finger on the encoder disk or bending the encoder wheel. This is a powerful motor so be careful. Turn power to motor off and then turn motor by hand and watch what the LCD shows. Look at PWM line (P3) to see what the power to the motor does while you turn encoder. Look at it as you change max index. We will be using this wiring layout for a while so leave it hooked up. In this program PotOne is read but not used. Divide the 4095 by a number to get a more realistic value to play with. Use it to change the variable you want to play with in real time. }}
Barcode Recognizer In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
Making Barcode In Java
Using Barcode drawer for Java Control to generate, create bar code image in Java applications.
Be sure to add Integ and index to the VAR section of the program. The index maximum of 5 determines how fast we integrate. If we make it 1,000, the motor will ramp up much more slowly. You can see all this by turning the power to the motor off and playing with moving the encoder back and forth with your fingers as you watch the LCD. See how the proportional and integrating values change. Do it, but be careful this motor can ramp up to full power very quickly, and the encoder could cut you! You can make the motor response as stiff as you need for your application. This is a part of the algorithm tuning process for your particular application. After these additions to the original program, the motor holds its position surprisingly well. You should feel confident that the motor will return to the zero position pretty much under all conditions. Still, we have limited the integration value to 2,000,
Bar Code Creation In Objective-C
Using Barcode generator for iPhone Control to generate, create barcode image in iPhone applications.
Creating EAN 128 In Objective-C
Using Barcode generation for iPhone Control to generate, create UCC - 12 image in iPhone applications.
Encoding Barcode In Java
Using Barcode creation for BIRT reports Control to generate, create bar code image in BIRT reports applications.
Generating Barcode In None
Using Barcode generation for Font Control to generate, create bar code image in Font applications.
Copyright © OnBarcode.com . All rights reserved.