CN101706648A - Design method of motion controller based on RCP and DSP - Google Patents

Design method of motion controller based on RCP and DSP Download PDF

Info

Publication number
CN101706648A
CN101706648A CN200910045229A CN200910045229A CN101706648A CN 101706648 A CN101706648 A CN 101706648A CN 200910045229 A CN200910045229 A CN 200910045229A CN 200910045229 A CN200910045229 A CN 200910045229A CN 101706648 A CN101706648 A CN 101706648A
Authority
CN
China
Prior art keywords
control
code
simulink
chip
dsp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200910045229A
Other languages
Chinese (zh)
Other versions
CN101706648B (en
Inventor
易建军
陈昌明
赵少华
王巍巍
袁野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
East China University of Science and Technology
Original Assignee
East China University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by East China University of Science and Technology filed Critical East China University of Science and Technology
Priority to CN200910045229A priority Critical patent/CN101706648B/en
Publication of CN101706648A publication Critical patent/CN101706648A/en
Application granted granted Critical
Publication of CN101706648B publication Critical patent/CN101706648B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a design method of a motion controller based on RCP and DSP. The design method comprises the following steps: designing and simulating a motion control algorithm, invoking a corresponding DSP chip and each module of the needed chip in a Matlab/Simulink, constructing a system control model by combining related control modules in the Simulink, utilizing the strong simulation function of the Simulink to carry out real-time simulation on the constructed system control model, adjusting corresponding control parameters till achieving the control requirements in the simulation; and conducting automatic code conversion, code transplantation and information feedback, and adjusting the parameters of the control system by repeating the steps so as to improve the whole motion control system. The design method has the advantages of reducing the threshold of developing the motion controller, and greatly diminishing development period and cost.

Description

A kind of method for designing based on RCP and DSP motion controller
[technical field]
The present invention relates to the design field of controller, specifically, be a kind of based on the method for designing of rapid control prototyping RCP (Rapid Controller Prototyping) with digital signal processor DSP (Digital SignalProcessing) motion controller.
[background technology]
The exploitation of existing motion controller often comprises two big links, the one, the software development of motion algorithm, the 2nd, the hardware design of motion controller.In traditional performance history, this two big link all needs the PHP of specialty and hardware engineer to develop at special development requires respectively; Debugging jointly then can well be applied in the hardware control calculation method.Have only these two links to cooperate closely and reach the system that forms an optimum, just deserve to be called the exploitation of the motion controller of success.
Yet in the performance history of the motion controller of reality, the realization of motion algorithm is a quite complicated software development process, and this process often needs the PHP of specialty to realize.The The Automation Design of present control system, all be in the development environment of corresponding microprocessor, manually to write compilation or C language or C++ code mostly, construction cycle is long, to having relatively high expectations of programmer, and most of programmers only are familiar with certain language, adaptability is very poor, and tangible limitation will appear in the exploitation of will interosculating in large-scale development project.The difference of custom because different programmers programmes, the code difference that the same language of the human that same system is different writes out is very big, make its legibility very poor, even concerning programmer oneself, program for some complicated a little point, written program oneself is read all gruelling, especially all the more so to assembly language after a period of time in person.
The hardware of motion controller then needs the Hardware Engineer to design according to the controlling object and the peripherals of motion controller, selects MCU (as: DSP) and various peripheral components.This just requires the Hardware Engineer to various MCU and suitable being familiar with of various peripheral components, has abundant hardware development experience.And once success of the design of hardware, often need be by authenticating to modification, by being modified to checking trial so repeatedly.The dsp system module is a lot, to just must understand very dark with compilation or C language compilation to its register and inner structure, DSP development environment CCS just as TI company learns also very time-consuming simultaneously, especially when the writing of GEL and CMD file, the problem that notes is a lot, very high to programmer's requirement like this, so not only prolonged system development cycle, want to keep outside of the door with large quantities of especially with DSP technician.
Yet hardware design is a stranger link for the software engineer, and motion algorithm complicated program also to be hardware engineering be a relatively weaker link.So in the performance history of motion controller, exist the link that motion algorithm exploitation and hardware design disconnect; This is to have the problem of being avoided of not levying in traditional development approach.Simultaneously, in Control System Design, traditional method legibility of manually writing code is poor, and the construction cycle is long, and the programmer is had relatively high expectations, and new hand crosses the threshold difficult.
[summary of the invention]
The objective of the invention is to overcome the deficiencies in the prior art, a kind of method for designing based on RCP and DSP motion controller is provided.
The objective of the invention is to be achieved through the following technical solutions:
A kind of method for designing based on RCP and DSP motion controller, used hardware comprises general motion controller, and Software Development Platform is MATLAB/Simulink/RTW, and concrete steps are:
(1) motion control arithmetic design and emulation: each module of in Matlab/Simulink, calling corresponding dsp chip (TMS320F2812) and needed chip, build system's controlling models in conjunction with relevant control module among the Simulink, utilize the powerful copying of Simulink, system's controlling models of putting up is carried out real-time simulation, regulate the control corresponding parameter, up in emulation, reaching the control requirement;
This step requires the utilization Matlab software that the developer can be more skilled, and there is certain understanding in the tool box of Simulink and the SDP series module of Ti company; This step can analog simulation the result of output, can allow the effect of the good observing system control module of deviser, improved the efficient of design greatly;
(2) automatic code conversion: the controlling models that emulation is good converts the code that needs to utilize the automatic code systematic function, set the type (as: assembly code of wanting generating code simultaneously, C code or C++ code), generate corresponding control routine, and code is forwarded in the CCS development environment automatically;
This step is utilized the automatic code systematic function, makes the developer can obtain complicated motion control code under the situation of not writing line code, has reduced the exploitation threshold of motion control arithmetic exploitation, has improved motion control arithmetic procedure development efficient;
(3) code is transplanted: motion control code is carried out in the CCS development environment comprehensively, be transplanted in the embedded real-time operating system after doing necessary modifications;
Because system adopts the embedded development method, so bring very big facility for the transplanting of code; This step requires the developer that the CCS development environment is had certain understanding, and can under the CCS development environment, carry out the programing work of assembly code or C code, the code that this step will generate automatically carries out necessary modifications, make its needs that meet concrete Application and Development, at last transplanting is had the embedded real time system code compile of motion control arithmetic to become final executable code;
(4) checking: the binary code that generates in the CCS environment is passed through the SEEDXDS-usb2.0 simulation programmer, download in the processor (DSP) of general motion controller, carry out the online motion control of practical object, and carry out data recording work;
This step requires the skilled use SEEDXDS-usb2.0 simulation programmer of deviser, and the correct executable file with compiling downloads in the processor, is to debug in hardware entities, carries out data recording, so that revise once more;
(5) information feedback: the data of record and the control input of expectation are compared, comparing result is fed back in the controlling models among the Simulink, if actual result and expectation value disagree, then accordingly system's controlling models or systematic parameter among the Simulink are made amendment;
This step provides test figure for the motion controller optimization Algorithm, programmes noting on the basis of actual result again, improved the efficient of motion control arithmetic exploitation, also embodied the RCP development approach incomparable a bit;
(6) repeat each parameter of above step adjustment control, improve whole motion controller.
Compared with prior art, good effect of the present invention is:
The present invention can be according to the ruuning situation of motion control program on the RCP hardware platform and the needs of products-hardware system, and on the basis of RCP hardware platform, the synchronous design of carrying out control algolithm and products-hardware circuit has improved development efficiency; Adopt the automatic code dress of Matlab to change technology, the various motion control arithmetics that are easy to realize in Matlab (can well be controlled as PID, fuzzy control etc.) convert the readable C code of writing to, and can be good at transplanting to be embedded in the CCStudio development environment calling, the C code of these motion controls is very complicated, often need professional experienced programmer to write, so reduced the threshold of motion controller exploitation greatly, and the cycle of exploitation and cost obtain reduction very.
[description of drawings]
Fig. 1 is the The general frame based on the development approach of the DSP motion controller of RCP.
Fig. 2 structural representation of the present invention;
Fig. 3 decides the speed by PID control flow chart;
Fig. 4 QEP is provided with synoptic diagram;
The procedure chart that the RCP of Fig. 5 constant speed degree control realizes;
Fig. 6 decides moment of torsion PID control flow chart;
Fig. 7 AD module is provided with synoptic diagram;
Fig. 8 decides the procedure chart of the RCP realization of moment of torsion control;
The schematic diagram of Fig. 9 power supply;
Figure 10 TPS75733 encapsulates figure;
Figure 11 TPS76801Q encapsulates figure;
Figure 12 a TPS75733 elementary diagram;
Figure 12 b TPS76801Q elementary diagram;
Figure 13 voltage transitions chip SN74CBTD3384;
Figure 14 grating encoder interface circuit schematic diagram;
Figure 15 a, Figure 15 b, Figure 15 c force transducer interface and amplifier elementary diagram thereof;
Figure 16 AD620 pin package figure.
[embodiment]
The embodiment of the method for designing of a kind of motion controller based on RCP and DSP of the present invention below is provided.
With a kind of Material Testing Machine of the motion controller based on RCP and DSP, describe its method for designing in detail below, accompanying drawing 1 is a kind of The general frame of method for designing of the motion controller based on RCP and DSP.
See also accompanying drawing 2, a kind of Material Testing Machine of the motion controller based on RCP and DSP, controller is connected with DA by the SPI universal serial bus, and DA links to each other with servo controller; Servo controller links to each other with servomotor by the data line of 50 pins; Photoelectric encoder carries out the collection of displacement signal by physical circuit with the pin of the QEP acquisition module of displacement signal and controller; Force transducer is connected by physical circuit the power value signal that collects with signal amplifier, the signal after the amplification is connected with the AD acquisition module of controller by physical circuit, carries out the AD conversion; Printer module is connected with the chip of controller by the RS232 serial ports; Real-time clock module is connected with the chip of controller by the SPI universal serial bus; Keysheet module connects by the chip of I2C bus in controller; The LCD module is connected with the chip of controller by the GPIO mouth; Power module is connected with the chip of controller by physical circuit; The TMS320F2812 that described controller is produced for Ti company:
Described design of Controller is divided into speed closed loop controlling Design and torque closed-loop control design;
Described speed closed loop controlling Design, gather displacement signal with photoelectric encoder, with after the computing of the chip signal processor of the feedback signal via controller that collects and handling, send feedback control signal by DA again and adjust rotating speed of motor then, thereby reach the effect of velocity feedback;
Specific implementation process based on the speed feedback control of RCP exploitation theory is: the velocity variations of servomotor is to realize by the voltage swing that adjusting sends to servoamplifier. carry out the control of constant speed degree, to enable servoamplifier earlier, this is to make the SRV-ON of amplifier 1 allow electrical power by control GPIOB2, enter servo enabled state, be the model selection of motor then, making C-MODE by control GPIOB1 is 0, when parameter Pr02=5, import 0 speed control, import 1 torque control; Control ZEROSPD that GPIOB0 guarantees servoamplifier then under normal operating condition, when the DA output voltage was 0, motor was static, when DA is output as positive voltage, and the corresponding main story of servomotor, and motor counter-rotating during DA output negative voltage; In this PID control closed loop, actuator is to send 16 numerical value by SPI to change the different rotating speeds that DA output voltage control servoamplifier is realized servomotor then, feedback signal is the displacement signal that collects the material test machine worktable by grating encoder, feed back to the QEP mouth of dsp chip then with the form of pulse, go out the speed of present material testing machine worktable by algorithm computation; The speed of calculating is compared with the speed of setting, obtain the control signal of a feedback, so just can make the speed of reality reach highly consistent, realization speed feedback control, its realization process flow diagram such as accompanying drawing 3 with setting speed by pid control algorithm;
The RCP of constant speed degree control realizes: the speed unit of the actual requirement of client is mm/min (0-600mm/min), in this section program, the constant speed degree that sets is 200mm/min, for the data of gathering from QEP, because on behalf of motor, per 1000 pulses revolve and turned around, so the setting of QEP module such as accompanying drawing 4; The data unit of QEP collection output is r/min like this, and the pitch of Material Testing Machine is 5mm, and motor one changes respective material testing machine lifting 5mm, so the speed of setting could be mated with the unit of feedback signal divided by 5; In the setting of servoamplifier, the rotating speed of input 1V voltage correspondence is 500r/min, so speed is exported to the needed voltage of servomotor divided by being only of obtaining of 500 (or multiply by 0.002).And the output of considering DA voltage is that 16 bit data by the SPI correspondence obtain, although that adopt in the design is 10 DA, SPI need send 16 data, and wherein high four all is the room with low two, and 10 middle DA conversion values that are only real correspondence; So 16 bit data of 0v voltage correspondence should be 512*4=2048, the 2.048V correspondence be 1024*4=4096 ,-2.048V correspondence be 0*4=0.The voltage output range of DA chip MAX504 is-2.048V-+2.048V, and 10 corresponding bit data should be 0-1024, just at last data promptly be multiply by 4 to moving to left 2; So 0 to be boundary, the voltage swing of every increase by 1 correspondence of the data of SPI is 2.048/512=0.004V, promptly will multiply by 250; 10 bit data value 512 of correspondence when adding 0V voltage on this basis then, last quadruplication is all right; In addition, also need three IO mouths of DSP to control the enabling of servomotor, model selection, clamped selection respectively, that this design is selected for use is respectively GPIOB2, GPIOB1, GPIOB0; In sum, obtain RCP model such as the accompanying drawing 5 of speed control in Simulink;
After having set up the RCP control module of velocity feedback, just can utilize the powerful copying of Simulink to carry out modeling and emulation (step 1); By emulation, the parameter in can modified module can be optimized program; When to simulated effect satisfaction, just can pass through code automatic conversion technology (step 2), the module converts after the emulation is become needed control routine; Control routine (is carried out in the step 3) comprehensively doing necessary modifications, is compiled into executable code then at CCS; (step 4) downloads to executable code in the TMS320F2812 controller by simulation programmer then; Start Material Testing Machine, carry out the debugging of velocity feedback, carry out record in case carry out controlling models necessity modification (step 5).
Described torque closed-loop control design in torque control, is gathered the power value signal by force transducer, and the power value signal that obtains from sensor carries out after signal amplifies through the AD amplifier, and the AD module of the chip signal processor by controller is gathered magnitude of voltage; According to power, the relation between radius and the torque just can obtain current level of torque through conversion again, behind the algorithm and processing through DSP, adjusts the analog value of DA output, controls the torque value of servomotor output, thereby reaches the FEEDBACK CONTROL of torque;
Develop the specific implementation process of the torque FEEDBACK CONTROL of theory based on RCP: it is on duty with the arm of force that torque equals power, and when the arm of force was constant, the realization of deciding torque was exactly the realization of deciding the power value in fact; The change in torque of servomotor also is to realize by the voltage swing that adjusting sends to servoamplifier, just will make C-MODE 1 allow servoamplifier be in moment of torsion state of a control (when the parameter Pr02=5) by control GPIOB1; Also to make the SRV-ON of amplifier 1 allow electrical power simultaneously by control GPIOB2, enter servo enabled state, in this PID control closed loop, actuator is to send 16 numerical value by SPI to change the different torques that DA output voltage control servoamplifier is realized servomotor then, feedback signal is to collect Material Testing Machine power output value size by force transducer to go out torque, the process flow diagram of its realization such as accompanying drawing 6 by the AD collection through certain algorithm computation behind the AD620 amplifying signal;
The RCP that decides torque control realizes: what select for use in the design is the ADCIN0 interface, and the result of AD conversion is kept in the ADCResult0 register, and digital value in the dsp chip AD transfer process and magnitude of voltage have following corresponding relation:
Figure G2009100452296D0000081
In this design, the ADCL0 pin ground connection of dsp chip, so the corresponding relation of digital value and magnitude of voltage can be converted to:
Voltage = 3 × Digital 4095 = 0.0007326 × Digital
So the output valve of ADC functional module be multiply by 0.0007326, and what obtain promptly is the voltage swing that ADCIN0 pin actual acquisition arrives; The magnitude of voltage of ADCIN0 pin collection is to amplify signal afterwards through AD620, because when the force value on the sensor is 0, the output voltage of AD620 is not 0, is 0.665V, so should deduct the initial voltage 0.665V of AD620 the calculating voltage recruitment time; The magnitude of voltage that obtains so promptly multiply by 416.66667 divided by the sensitivity 2.4 * 10-3V/N of sensor, and what obtain is the force value that pressure transducer collects; The force value that pressure transducer is collected is drawn out to the output port of subsystem module 1 at last; The setting of servo-driver is that the input voltage of output 1.3N/m nominal torque correspondence is 1V; So with the torque value of expectation divided by 1.3 or multiply by 0.76923 promptly obtain exporting this expectation torque value should be to the magnitude of voltage of servo-driver transmission;
The AD module setting of DSP in Simulink be as shown in Figure 7: in addition, also need two IO mouths of DSP to control the enabling of servomotor, model selection respectively, that this design is selected for use is respectively GPIOB2, GPIOB1, in sum, obtain torque and be controlled at RCP model such as accompanying drawing 8 among the Simulink;
After having set up the RCP control module of torque feedback, just can utilize the powerful copying of Simulink to carry out modeling and emulation (step 1); By emulation, the parameter in can modified module can be optimized program.When to simulated effect satisfaction, just can pass through code automatic conversion technology (step 2), the module converts after the emulation is become needed control routine; Control routine (is carried out in the step 3) comprehensively doing necessary modifications, is compiled into executable code then at CCS; (step 4) downloads to executable code in the TMS320F2812 controller by simulation programmer then; Start Material Testing Machine, carry out the debugging of torque feedback, carry out record in case carry out controlling models necessity modification (step 5).
Power module: for the power supply of DSP control panel system, the present invention adopts the linear stabilized power supply of design voluntarily to close, it can convert the AC power of 220V to multiple constant voltage dc source output, it can provide+12V, 2+5V and-three kinds of constant voltage dc sources of 5V, and a plurality of independently ground connection, this power supply has well solved the problem of voltage disturbance, the present invention separates mimic channel and digital circuit, well improved the precision of analog acquisition, can satisfy the power requirement of designed DSP control panel fully, be the schematic diagram of power supply as accompanying drawing 9;
For DA chip MAX504, it all is 5V that signal amplifies the required power supply of chip AD620, then can directly utilize total power supply to get final product, and dsp chip and common single-chip microcomputer are different, its chip core CPU power supply is+1.9V, and the power supply of outside GPIO interface is+3.3V, when dsp chip powers on, outside GPIO interface (+3.3) powers on earlier, then kernel CPU (+1.9V) power on again, and the supply current of kernel otherwise greater than 1uA, therefore this just needs an energy 5V to be converted to the chip of 1.9V and 3.3V, and to guarantee that this two chip block has certain sequencing when powering on, the two voltage transitions chip of selecting for use in this design proposal is respectively TPS75733 and TPS76801Q, respectively this two voltage transitions chip is introduced below: TPS75733 is a chip that the 5V voltage transitions of input is exported for 3.3V voltage, and accompanying drawing 10 is its encapsulation figure, and EN is the enable pin of TPS75733, when this pin was low level, TPS75733 can realize voltage conversion function; When this pin is high level, when finishing voltage transitions, the voltage regulator of chip internal is closed, quiescent current under the standard state is reduced to 1uA, the FB pin is the feedback pin of TPS75733, and the voltage access feedback pin with output so just can make TPS75733 that the voltage of output is adjusted in real time, guarantee the accuracy of output voltage, each pin function of TPS75733 is as shown in table 1:
Table 1 TPS75733 pin function
Pin name Sequence number ??I/O Describe
??EN ??1 ??I Enable pin
??FB/PG ??5 ??I Voltage Feedback is regulated pin
??GND ??3 Grounding pin
??IN ??2 ??I The voltage input pin
??OUTPUT ??4 ??O The voltage output pin
TPS76801Q aly becomes 1.9V voltage output with the 5V voltage transitions, and accompanying drawing 11 is schemed for its encapsulation, and EN is the enable pin of TPS76801Q, and when this pin was low level, TPS75733 can realize voltage conversion function; When this pin was high level, when finishing voltage transitions, the voltage regulator of chip internal was closed, enter dormant state, the quiescent current under the standard state is reduced to 1uA, and FB is the feedback pin of TPS76801Q, in order to monitor output voltage, guarantee the accuracy of output voltage.
Each functions of pins of TPS76801Q is as shown in table 2:
Table 2 TPS76801Q pin function
Pin name Sequence number ??I/O Describe
??GND ??1 Grounding pin
??EN ??2 ??I Enable pin
??IN ??3 ??I The voltage input pin
??IN ??4 ??I The voltage input pin
??OUT ??5 ??O The adjustable voltage output pin
Pin name Sequence number ??I/O Describe
??OUT ??6 ??O The adjustable voltage output pin
??FB/NC ??7 ??I Voltage Feedback is regulated pin
??PG ??8 ??O The PG output pin
Owing in the power up of dsp chip, require outside GPIO interface to power on prior to kernel, and the GPIO interface power requirement of DSP is+3.3V, if the power supply+1.9V of innernal CPU, so TPS75733 and TPS76801Q are the DSP power supply sequencing to be arranged, be that TPS75733 is outside GPIO interface power supply earlier, then enabling TPS76801Q is the kernel power supply, will guarantee that simultaneously the kernel supply current is not more than 1uA.
Solution of the present invention is that the EN pin with the FB pin of TPS75733 and TPS76801Q links to each other, and the direct ground connection of EN pin of TPS75733, like this after system powers on, TPS75733 directly realizes voltage transitions, and when the FB pin of TPS75733 receives feedback voltage, the EN pin of TPS76801Q also receives a high level, thereby make TPS76801Q enter into the duty of dormancy, and the mistiming that in power supply, also has a feedback at two chip, thereby satisfy the designing requirement of dsp chip power supply, circuit design principle figure is referring to accompanying drawing 12a, shown in Figure 12 b.
Voltage transitions chip SN74CBTD3384: because the I/O interface voltage of this dsp chip TMS320F2812 is 3.3V, and the interface voltage of general peripherals is 5V, this just needs the voltage transitions chip of a 5V to 3.3V, what this design was selected for use is exactly the SN74CBTD3384 chip, this chip application is very simple, only need external 5V power lead with accordingly, the conversion mouth of 3.3V and 5V receives on the chip accordingly that input/output port gets final product then, referring to accompanying drawing 13.
The grating encoder interface circuit: grating encoder is to be used for gathering the rate signal of servomotor and the sensing equipment of position signalling in this design; Rotary encoder has three passages: A channel, B passage and Z passage; Wherein 90 degree of phasic difference mutually of A channel and B passage output square wave only connect a wherein paths, can obtain the information of rotating speed; Connect two paths, not only can obtain rotary speed information, can also judge sense of rotation, the Z passage is also referred to as zero passage, and this passage has provided the absolute zero position of scrambler axle.
In the present invention, obtain motor steering in order promptly to obtain velocity magnitude, and consider that this dsp chip TMS320F2812 has the quadrature interface QEP of special collection grating signal, then on hardware A, the B two paths that connects grating simultaneously, it can directly be stored into umber of pulse in the related register, and direction and the speed that can judge scrambler respectively by the increase and decrease and the frequency of umber of pulse.Therefore in the process of circuit design, only need directly A and B two paths of signals line to be connected on two QEP interfaces of F2812; But the power supply of considering scrambler is 5V, the peak value of the square wave of A and the output of B two paths of signals also is 5V, exceeded the F2812 chip service area (+3.3V), so will carry out voltage transitions crest voltage is reduced to 3.3V by SN74CBTD3384, the interface circuit schematic diagram of grating encoder is shown in accompanying drawing 14.
Force transducer: the size of ergometry value is to control for the torque of deciding that realizes motor, need ergometry value size just can obtain corresponding torque following of the certain situation of the arm of force, what adopt in this design is S type pressure transducer, when stress is on foil gauge R, the other two ends of electric bridge just can be exported and the adding voltage that is directly proportional of stress, only need remove to gather the voltage swing of being exported to the design of circuit and just can obtain corresponding pulling force size with AD, but consider that its output signal is very weak, could effectively be gathered by DSP after then need adding a signal amplifier in addition, the AD620 that adopts among the design, its whole wiring circuit theory diagrams are referring to accompanying drawing 15a, Figure 15 b, Figure 15 c; In the Acquisition Circuit of power value signal, come noise in the erasure signal with filtering circuit, in collection of simulant signal, adopt self-alignment mode, on program, use over-sampling that the value of gathering is handled, facts have proved that the value that collects analog quantity is more satisfactory by above three means.
For AD620, it is a high-precision voltage amplification chip, it can the pick-up transducers two paths electric potential difference and amplify output, its amplification coefficient can from 1 to 1000, the enlargement factor of AD620 depends on the gain resistor size that inserts between two RG pins, and the pass of amplification coefficient G and gain resistor RG is:
G=1+(49.4K/RG)
In the present invention, selected gain amplifier resistance is 470 Ω, and the amplification coefficient of AD620 is nearly 106 times like this, and the electric potential difference that draws just can satisfy the voltage input requirement of the AD module 0V of F2812 chip to 3V; The encapsulation figure of AD620, shown in accompanying drawing 16:
DA chip MAX504: under speed control mode, the rotating speed available PMW output of size (adjusting dutycycle) or the DA output (changing voltage output size) that change AC servo motor realize; What this design was adopted is the DA output scheme, and the chip of employing is exactly MAX504; It is a low-power consumption of MAXIM company production, 10 bit serial analog-digital chips of low-voltage output, the serial A device.MAX504 had been both available+5V single supply work functions, also available ± work of 5V dual power supply, and this chip for the every error that comprises skew, gain and linear error all adjusting, so use very simply, do not need to proofread and correct once again.
What MAX504 adopted is 3-line serial interface, and with SPI, QSPI and Microwire standard are all compatible.MAX504 can programme by writing two 8 long data, and its sequencing that writes is, 4 fillers, 10 data bit and minimum two 0; Herein, the highest 4 filler has only when MAX504 adopts daisy chaining to connect and must write, and minimum two 0 then necessarily need write.And if only if, and the CS sheet selects when effective, and data are squeezed into 16 bit shift register in the sheet by turn at the rising edge of SCLK, and at the CS rising edge, (the 2nd~11st) is sent in the D/A translation register with effective 10 bit data, revises former content of registers.
The MAX504 chip is the DIP or the S0 packing forms of 14 pins, except that power supply and ground pin, pin can be divided into two groups, one group is connected with processor, the difference of another group pin connects the mode of operation that can change MAX504, MAX504 has three kinds of mode of operations, is respectively unipolarity output, bipolarity output and four-quadrant multiplier.By REIN with MAX504, VOUT, the different connected modes of BIPOFF and the several pins of RFB can be defined as MAX504 the mode of operation that needs as required; Because when the control servo-driver, need to use generating positive and negative voltage to control the rotating of motor respectively, so what we used when using MAX504 is the bipolarity configuration, BIPOFF will be connected to REFIN and RFB on the hardware, what adopt then is dual power supply (± 5V) power supply.
The F2812 chip is to realize by its serial peripheral equipment interface SPI that carries with communicating by letter of MAX504.SPI is a high-speed synchronous serial input/output port, and it moves into or shift out from device with programmable bit transfer rate; MAX504 has three with the main pin that dsp chip TMS320F2812 processor is connected, and is respectively:
(1) DIN-data input pin, this pin is used to receive the serial communication data-signal, directly is connected with the SPISIMO pin of DSP;
(2) SCLK-serial clock input end, this pin is used to receive the clock signal of serial communication, so that the communicating pair in the serial communication process is synchronous, the direct connection with the SPI clock output pin SPICLK of DSP gets final product;
(3) the CS-sheet selects pin, this pin is that low level is effective, have only when CS is effective, MAX504 receives data, and when CS lost efficacy, begin to carry out data-switching, in this circuit, use the driven transmission enable pin SPISTEA of DSP, but the signal that comes out from DSP is all based on 3.3V voltage, and peripheral DA chip MAX504 signal is based on 5V, so need the voltage transitions chip SN74CBTD3384 of a 3.3V to 5V between both signals.
Keysheet module: the Keysheet module in the invention adopts 7290 keyboard chips of Zhou Ligong company; Use I2C communication mode and TMS320F2812 chip communication; This chip can provide 64 keys of 8 row, 8 row; Have more 20 keys of actual conditions in the present invention with the 4x5 ranks.
The LCD module: the present invention adopts the liquid crystal of 320x240 dot matrix; Liquid Crystal Module links to each other with the TMS320F2812 chip by the GPIO mouth; Because the power that liquid crystal needs in electric system is relatively big; So use a three terminal regulator to be its power supply specially separately.
Real-time clock module: the present invention realizes real-time clock module with the DS1302 real-time timepiece chip, and DS1302 communicates by SPI universal serial bus and TMS320F2812 chip; System can realize reading and being provided with of real-time time, for system provides time reference.
Printer module: the present invention selects bright bright Chinese character mini-printer for use, adopts RS232 serial ports and TMS320F2812 chip to communicate, because the power ratio that printer needs is bigger, so its power supply and analog power and digital power are separated power supply separately.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, without departing from the inventive concept of the premise; can also make some improvements and modifications, these improvements and modifications also should be considered within the scope of protection of the present invention.

Claims (1)

1. the method for designing based on the motion controller of RCP and DSP is characterized in that, its concrete steps are:
(1) motion control arithmetic design and emulation: each module of in Matlab/Simulink, calling corresponding dsp chip and needed chip, build system's controlling models in conjunction with relevant control module among the Simulink, utilize the powerful copying of Simulink, system's controlling models of putting up is carried out real-time simulation, regulate the control corresponding parameter, up in emulation, reaching the control requirement;
(2) automatic code conversion: the controlling models that emulation is good converts the code that needs to utilize the automatic code systematic function, sets the type of wanting generating code simultaneously, generates corresponding control routine, and code is forwarded in the CCS development environment automatically;
(3) code is transplanted: motion control code is carried out comprehensively being transplanted in the embedded real-time operating system after the modification in the CCS development environment;
(4) checking: the binary code that generates in the CCS environment is passed through the SEEDXDS-usb2.0 simulation programmer, download in the processor of general motion controller, carry out the online motion control of practical object, and carry out data recording work;
(5) information feedback: the data of record and the control input of expectation are compared, comparing result is fed back in the controlling models among the Simulink, if actual result and expectation value disagree, then accordingly system's controlling models or systematic parameter among the Simulink are made amendment;
(6) repeat each parameter of above step adjustment control, improve whole motion controller.
CN200910045229A 2009-01-13 2009-01-13 Design method of motion controller based on RCP and DSP Expired - Fee Related CN101706648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910045229A CN101706648B (en) 2009-01-13 2009-01-13 Design method of motion controller based on RCP and DSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910045229A CN101706648B (en) 2009-01-13 2009-01-13 Design method of motion controller based on RCP and DSP

Publications (2)

Publication Number Publication Date
CN101706648A true CN101706648A (en) 2010-05-12
CN101706648B CN101706648B (en) 2012-08-29

Family

ID=42376878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910045229A Expired - Fee Related CN101706648B (en) 2009-01-13 2009-01-13 Design method of motion controller based on RCP and DSP

Country Status (1)

Country Link
CN (1) CN101706648B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901016A (en) * 2010-07-26 2010-12-01 大连理工大学 Programmed temperature-rising controller adopting fuzzy PID for SOPC
CN102279736A (en) * 2011-06-02 2011-12-14 意昂神州(北京)科技有限公司 D2P-based RMS motor controller development system
CN102289217A (en) * 2011-02-25 2011-12-21 广西大学 Modular reconfigurable motion control system with axle as unit
CN103048930A (en) * 2011-10-11 2013-04-17 E2M科技B.V. Motion simulator
CN103092082A (en) * 2013-01-07 2013-05-08 河南科技大学 Driver-in-the-loop vehicle performance optimizing simulation testing system
CN103913992A (en) * 2013-12-09 2014-07-09 成都运达科技股份有限公司 Engineering mechanical control logic visualization simulation method
CN104678967A (en) * 2015-02-10 2015-06-03 贵州大学 Method and equipment for realizing rapid prototype designing of PWM controller by combining universal industrial personal computer and DSP
CN103235518B (en) * 2013-04-19 2016-04-27 中国科学院光电技术研究所 A kind of test method to photoelectric tracking systems stabilisation and platform
CN106325104A (en) * 2016-10-28 2017-01-11 黑龙江省电力科学研究院 Setting and adjustment method for thermal control PID parameters based on MATLAB modeling and simulation
CN107255939A (en) * 2017-06-09 2017-10-17 南京航空航天大学 A kind of controller replacement method based on aero-engine full digital trigger technique platform
CN108469778A (en) * 2017-10-23 2018-08-31 北京灵思创奇科技有限公司 A kind of SERVO CONTROL MBD development platforms
CN109318228A (en) * 2018-09-27 2019-02-12 中国矿业大学 Desktop grade sixdegree-of-freedom simulation rapid control prototyping experimental system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824250B (en) * 2016-05-14 2018-10-19 大连理工大学 Bionic arm control system based on cerebellar model and cerebellar model modeling method

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901016A (en) * 2010-07-26 2010-12-01 大连理工大学 Programmed temperature-rising controller adopting fuzzy PID for SOPC
CN102289217A (en) * 2011-02-25 2011-12-21 广西大学 Modular reconfigurable motion control system with axle as unit
CN102289217B (en) * 2011-02-25 2012-09-05 广西大学 Modular reconfigurable motion control system with axle as unit
CN102279736A (en) * 2011-06-02 2011-12-14 意昂神州(北京)科技有限公司 D2P-based RMS motor controller development system
CN102279736B (en) * 2011-06-02 2014-12-10 意昂神州(北京)科技有限公司 D2P-based RMS motor controller development system
CN103048930A (en) * 2011-10-11 2013-04-17 E2M科技B.V. Motion simulator
CN103092082A (en) * 2013-01-07 2013-05-08 河南科技大学 Driver-in-the-loop vehicle performance optimizing simulation testing system
CN103092082B (en) * 2013-01-07 2015-08-12 河南科技大学 A kind of driver is in ring vehicle performance optimization Simulation pilot system
CN103235518B (en) * 2013-04-19 2016-04-27 中国科学院光电技术研究所 A kind of test method to photoelectric tracking systems stabilisation and platform
CN103913992A (en) * 2013-12-09 2014-07-09 成都运达科技股份有限公司 Engineering mechanical control logic visualization simulation method
CN104678967A (en) * 2015-02-10 2015-06-03 贵州大学 Method and equipment for realizing rapid prototype designing of PWM controller by combining universal industrial personal computer and DSP
CN104678967B (en) * 2015-02-10 2017-07-11 贵州大学 General industrial computer joint DSP realizes PWM controller Rapid Prototype Design method and apparatus
CN106325104A (en) * 2016-10-28 2017-01-11 黑龙江省电力科学研究院 Setting and adjustment method for thermal control PID parameters based on MATLAB modeling and simulation
CN107255939A (en) * 2017-06-09 2017-10-17 南京航空航天大学 A kind of controller replacement method based on aero-engine full digital trigger technique platform
CN107255939B (en) * 2017-06-09 2020-04-21 南京航空航天大学 Controller replacement method based on all-digital simulation platform of aero-engine
CN108469778A (en) * 2017-10-23 2018-08-31 北京灵思创奇科技有限公司 A kind of SERVO CONTROL MBD development platforms
CN109318228A (en) * 2018-09-27 2019-02-12 中国矿业大学 Desktop grade sixdegree-of-freedom simulation rapid control prototyping experimental system
CN109318228B (en) * 2018-09-27 2021-07-09 中国矿业大学 Desktop-level six-degree-of-freedom mechanical arm rapid control prototype experimental system

Also Published As

Publication number Publication date
CN101706648B (en) 2012-08-29

Similar Documents

Publication Publication Date Title
CN101706648B (en) Design method of motion controller based on RCP and DSP
CN105068564A (en) Displacement control method for piezoelectric ceramic actuator
CN102708749B (en) Portable classroom teaching demonstration model
CN103984327B (en) Small digital actuator system based on fuzzy control
CN102830629B (en) Testing device and method of power electronic control system
Wang et al. Digital twin-driven virtual commissioning of machine tool
CN100501705C (en) Tester measure and control device based on DSP and measure and control method thereof
CN106873524A (en) A kind of Digit Control Machine Tool closed-loop control system based on PC
CN101526805A (en) PLC analog control system and analog control method thereof
CN102156407A (en) Predictive control method and device for ARM (advanced RISC machines)-based embedded type model
CN103454945A (en) Distributed motion control system of leg type walking robot
CN208621176U (en) A kind of composite material blade intrinsic frequency test platform based on OPC technology
CN201122985Y (en) Network type programmable controller group-control experimental device
CN202548562U (en) PLC (Programmable Logic Controller) experiment system
CN107731041A (en) A kind of flight simulator electro-servo control load system
CN206224175U (en) A kind of industrial nerve network controller
Zhang et al. Design of embedded control system based on arm9 microcontroller
CN103676893A (en) Testing machine measurement and control system
CN205644169U (en) Control system of marching type motor governing valve
CN104298185B (en) A kind of computer general-purpose USB circuit controller and its implementation
CN206133556U (en) A computer central processing unit for teaching experiment
CN103488090B (en) Incinerator hazardous emission control system up to standard and the method for gunz machine learning
Roshan et al. Developing a course and laboratory for embedded control of mechatronic systems
CN105892406B (en) Intelligence test and appraisal Open motion control experimental teaching unit
CN201629089U (en) All-digital servo adjusting and status display experimental apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120829

Termination date: 20200113

CF01 Termination of patent right due to non-payment of annual fee