CN101706648B - 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
CN101706648B
CN101706648B CN200910045229A CN200910045229A CN101706648B CN 101706648 B CN101706648 B CN 101706648B CN 200910045229 A CN200910045229 A CN 200910045229A CN 200910045229 A CN200910045229 A CN 200910045229A CN 101706648 B CN101706648 B CN 101706648B
Authority
CN
China
Prior art keywords
control
dsp
module
signal
chip
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.)
Expired - Fee Related
Application number
CN200910045229A
Other languages
Chinese (zh)
Other versions
CN101706648A (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

Landscapes

  • Feedback Control In General (AREA)

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 motioncontrol 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 of the motion controller based on RCP and DSP
[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 the motion controller of digital signal processor DSP (Digital Signal Processing).
[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 designs of motion controller.In traditional performance history, this two big link all needs the PHP of specialty and hardware engineer to develop to 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, and to having relatively high expectations of programmer, and most of programmer only is familiar with certain language; Adaptability is very poor, and tangible limitation will appear in the exploitation of in large-scale development project, will interosculating.The difference of custom because different programs person 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, for the program of 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; Use compilation or the C language just must be very dark to the understanding of its register and inner structure, the while, the DSP development environment CCS just as TI company learns also very time-consuming, 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 designs 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 designs disconnect; This is to have the problem of being avoided of not levying in the traditional development method.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 deficiency of prior art, a kind of method for designing of the motion controller based on RCP and DSP is provided.
The objective of the invention is to realize through following technical scheme:
A kind of method for designing of the motion controller based on RCP and DSP, 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 to putting up is carried out real-time simulation, regulates 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 let the effect of the good observing system control module of deviser, improved efficiency 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 automatically code is forwarded in the CCS development environment;
This step is utilized the automatic code systematic function, makes the developer under the situation of not writing line code, obtain the complicated motion control routine, 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, have the embedded real time system code compile of motion control arithmetic to become final executable code transplanting at last;
(4) checking: the binary code that generates in the CCS environment through the SEEDXDS-usb2.0 simulation programmer, is downloaded 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 control input of data recorded and expectation is 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, has improved the efficient of motion control arithmetic exploitation, has also embodied the incomparable advantage of RCP development approach;
(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; Can well the various motion control arithmetics that in Matlab, are easy to realize (be controlled like 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 needs professional experienced programmer to write; So just reduced the threshold of motion controller exploitation greatly, and the cycle and the cost of exploitation 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 is a structural representation of the present invention;
Fig. 3 is for deciding the speed by PID control flow chart;
Fig. 4 is provided with synoptic diagram for QEP;
Fig. 5 is the procedure chart of the RCP realization of constant speed degree control;
Fig. 6 is for deciding moment of torsion PID control flow chart;
Fig. 7 is provided with synoptic diagram for the AD module;
The procedure chart that Fig. 8 realizes for the RCP that decides moment of torsion control;
Fig. 9 is the schematic diagram of power supply;
Figure 10 is TPS75733 encapsulation figure;
Figure 11 is TPS76801Q encapsulation figure;
Figure 12 a is the TPS75733 elementary diagram;
Figure 12 b is the TPS76801Q elementary diagram;
Figure 13 is voltage transitions chip SN74CBTD3384;
Figure 14 a, Figure 14 b, Figure 14 c are force transducer interface and amplifier elementary diagram thereof;
Figure 15 is 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, specify its method for designing 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, dsp chip is connected with DA through the SPI universal serial bus, and DA links to each other with servo controller; Servo controller links to each other with servomotor through the data line of 50 pins; Photoelectric encoder carries out the collection of displacement signal through physical circuit with the pin of the QEP acquisition module of displacement signal and dsp chip; Force transducer is connected through physical circuit the power value signal that collects with signal amplifier, the signal after the amplification is connected with the AD acquisition module of dsp chip through physical circuit, carries out the AD conversion; Printer module is connected with dsp chip through the RS232 serial ports; Real-time clock module is connected with dsp chip through the SPI universal serial bus; Keysheet module is connected with dsp chip through the I2C bus; The LCD module is connected with dsp chip through the GPIO mouth; Power module is connected with dsp chip through physical circuit; The TMS320F2812 that described dsp chip 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; Then with the computing of the chip signal processor of the feedback signal via controller that collects with handle after, send feedback control signal through DA again and adjust rotating speed of motor, thereby reach the effect of velocity feedback;
Concrete implementation procedure based on the speed feedback control of RCP exploitation theory is: the velocity variations of servomotor is to realize through the voltage swing that adjusting sends to servoamplifier.Carry out constant speed degree control, will enable servoamplifier earlier, this is to make the SRV-ON of amplifier 1 let electrical power through control GPIOB2; Get into servo enabled; Be the model selection of motor then, making C-MODE through 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 through 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 through 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 through algorithm computation; The speed of calculating and the speed of setting are compared, 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 through 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; Data for gathering from QEP turn around because on behalf of motor, per 1000 pulses revolve, 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 up-down 5mm, so the speed of setting could be mated with the unit of feedback signal divided by 5; In the setting of servoamplifier, the corresponding rotating speed of input 1V voltage 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 to be obtained by 16 corresponding bit data of SPI, 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 that 0v voltage is corresponding should be 512*4=2048, that 2.048V is corresponding is 1024*4=4096, and that-2.048V is corresponding is 0*4=0.The voltage output range of DA chip MAX504 is-2.048V---+2.048V, and 10 corresponding bit data should be 0---and 1024, just promptly multiply by 4 to data to moving to left 2 at last; So 0 to be boundary, every increase by the 1 corresponding voltage swing 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 come to control respectively the enabling of servomotor, model selection, clamped selection, this design Selection be 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); Through 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 through 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 through force transducer, and the power value signal that from sensor, obtains carries out after signal amplifies through the AD amplifier, and the AD module of the chip signal processor through controller is gathered magnitude of voltage; According to power, the relation between radius and the torque just can obtain the current torque size through conversion again, and behind the algorithm and processing through DSP, the analog value of adjustment DA output is controlled the torque value of servomotor output, thereby reaches the FEEDBACK CONTROL of torque;
Develop the concrete implementation procedure 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 through the voltage swing that adjusting sends to servoamplifier, just will make C-MODE 1 let servoamplifier be in moment of torsion state of a control (when the parameter Pr02=5) through control GPIOB1; Also to make the SRV-ON of amplifier 1 let electrical power simultaneously through control GPIOB2; Get into servo enabled; In this PID control closed loop; Actuator is to send 16 numerical value through 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 through force transducer behind the AD620 amplifying signal, to go out torque, the process flow diagram of its realization such as accompanying drawing 6 by the AD collection through certain algorithm computation;
The RCP that decides torque control realizes: what in the design, select for use 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:
In this design, the ADCL0 pin ground connection of dsp chip, so the corresponding relation of digital value and magnitude of voltage can convert into:
Voltage = 3 × Digital 4095 = 0.0007326 × Digital
So the output valve of ADC functional module 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 at last pressure transducer is collected is drawn out to the output port of subsystem module 1; The setting of servo-driver is that the corresponding input voltage of output 1.3N/m nominal torque 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;
DSP is provided with shown in accompanying drawing 7 in the AD module among the Simulink: in addition; Also need two IO mouths of DSP to come to control respectively the enabling of servomotor, model selection; This design Selection be 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); Through 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 through 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, and 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 having improved the precision of analog acquisition, can satisfy the power requirement of the DSP control panel that is designed fully, is the schematic diagram of power supply like accompanying drawing 9;
Amplifying the required power supply of chip AD620 for DA chip MAX504, signal all is 5V, then can directly utilize total power supply to get final product, and dsp chip and common single-chip microcomputer is 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 and the supply current of kernel otherwise again greater than 1uA; Therefore this just needs an ability to convert 5V into 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 in this design proposal, selecting for use 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; Accompanying drawing 10 is its encapsulation figure; EN is the enable of TPS75733, and when this pin was low level, TPS75733 can realize voltage conversion function; When this pin was high level, when accomplishing voltage transitions, the voltage regulator of chip internal was 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 1TPS75733 pin function
Pin name Sequence number I/O Describe
EN 1 I Enable
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
TP876801Q 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 of TPS76801Q, and when this pin was low level, TPS75733 can realize voltage conversion function; When this pin was high level, when accomplishing voltage transitions, the voltage regulator of chip internal was closed; Get into dormant state, the quiescent current under the standard state is reduced to 1uA, and FB is the feedback pin of TPS76801Q; In order to keep watch on output voltage, guarantee the accuracy of output voltage.
Each functions of pins of TPS76801Q is as shown in table 2:
Table 2TPS76801Q pin function
Figure GSB00000802993200111
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 will have a sequencing so TPS75733 and TPS76801Q are the DSP power supply, promptly TPS75733 is earlier outside GPIO interface power supply; 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 received feedback voltage, the EN pin of TPS76801Q also received a high level, thereby makes 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, and this just needs the voltage transitions chip of a 5V to 3.3V, this design Selection be 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 coder shaft.
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 be A, the B two paths that connects grating simultaneously on hardware, it can directly be stored into umber of pulse in the related register, and direction and the speed that can come to judge respectively scrambler through 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, and the peak value of the square wave of A and B two paths of signals output is 5V also, exceeded the F2812 chip service area (+3.3V), PV is reduced to 3.3V so will carry out voltage transitions through SN74CBTD3384.
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 in this design, adopt 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; The design of circuit is only needed to remove to gather the voltage swing of being exported with AD just can obtain corresponding pulling force size, but consider its export signal very a little less than, 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 14a, Figure 14 b, Figure 14 c; In the Acquisition Circuit of power value signal, come the 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 through 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, and the enlargement factor of AD620 depends on the gain resistor size that inserts between two RG pins, and the relation of amplification coefficient G and gain resistor RG is:
G=1+(49.4K/RG)
In the present invention, the gain amplifier resistance of being selected for use is 470Q, 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 15:
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 each item error that comprises skew, gain and linear error all with adjustment, 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 through writing two 8 long data, and its sequencing that writes does, 4 fillers, 10 data bit and minimum two 0; Here, 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 SO packing forms of 14 pins; Except that power supply and ground pin, pin can be divided into two groups, and 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.Through REIN with MAX504, VOUT, the different connected modes of BIPOFF and the several pins of RFB can be defined as the mode of operation that needs with MAX504 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, will BIPOFF 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 through its serial peripheral equipment interface SPI that carries with communicating by letter of MAX504.SPI is a high-speed synchronous serial IO 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 SPISIM0 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, and this pin is that low level is effective, has only when CS is effective; MAX504 receives data, and when CS lost efficacy, begins to carry out data-switching; In this circuit, use the driven transmission enable SPISTEA of DSP, but all be the basis with 3.3V voltage from the signal that DSP comes out; And peripheral DA chip MAX504 signal is the basis with 5V, so between both signals, need the voltage transitions chip SN74CBTD3384 of a 3.3V to 5V.
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 through 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 through 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, under the prerequisite that does not break away from the present invention's design; Can also make some improvement and retouching, these improvement and retouching also should be regarded as in protection scope of the present invention.

Claims (1)

1. the method for designing based on the motion controller of RCP and DSP is characterized in that,
Should be connected with DA through the SPI universal serial bus with the dsp chip of the motion controller of DSP based on RCP, DA links to each other with servo controller; Servo controller links to each other with servomotor through the data line of 50 pins; Photoelectric encoder is connected displacement signal to realize the collection of displacement signal through physical circuit with the pin of the QEP acquisition module of dsp chip; Force transducer is connected through physical circuit the power value signal that collects with signal amplifier, the signal after the amplification is connected with the AD acquisition module of dsp chip through physical circuit, carries out the AD conversion; Printer module is connected with dsp chip through the RS232 serial ports; Real-time clock module is connected with dsp chip through the SPI universal serial bus; Keysheet module is connected with dsp chip through the I2C bus; The LCD module is connected with dsp chip through the GPIO mouth; Power module is connected with dsp chip through physical circuit;
Said force transducer comes the noise in the erasure signal with filtering circuit in the Acquisition Circuit of power value signal, in collection of simulant signal, adopt self-alignment mode, on program, uses over-sampling that the value of gathering is handled;
The velocity variations of servomotor is to realize through the voltage swing that adjusting sends to servoamplifier: carry out the control of constant speed degree, will enable servoamplifier earlier, this is to make the SRV-ON of amplifier 1 let electrical power through control GPIOB2; Get into servo enabled; Be the model selection of motor then, making C-MODE through 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 through 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 through 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 through algorithm computation; The speed of calculating and the speed of setting are compared, obtain the control signal of a feedback, so just can make the speed of reality reach highly consistent, the realization speed feedback control with setting speed through pid control algorithm;
The concrete steps of method for designing 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 to putting up is carried out real-time simulation, regulates 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 automatically code is forwarded in the CCS development environment;
(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 through the SEEDXDS-usb2.0 simulation programmer, is downloaded 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 control input of data recorded and expectation is 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 Simul ink 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 CN101706648A (en) 2010-05-12
CN101706648B true 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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824250A (en) * 2016-05-14 2016-08-03 大连理工大学 Bionic arm control system based on cerebellum model and method for cerebellum model modeling

Families Citing this family (11)

* 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
CN102289217B (en) * 2011-02-25 2012-09-05 广西大学 Modular reconfigurable motion control system with axle as unit
CN102279736B (en) * 2011-06-02 2014-12-10 意昂神州(北京)科技有限公司 D2P-based RMS motor controller development 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
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
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
CN109318228B (en) * 2018-09-27 2021-07-09 中国矿业大学 Desktop-level six-degree-of-freedom mechanical arm rapid control prototype experimental system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蒲琪等.基于TMS320F2812的电子万能材料试验机测控***.《仪表技术与传感器》.2007,(第10期),第53-55页. *

Cited By (2)

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

Also Published As

Publication number Publication date
CN101706648A (en) 2010-05-12

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
CN104122089B (en) Turboshaft engine speed torque signal simulation device and simulation method
CN102708749B (en) Portable classroom teaching demonstration model
CN103984327B (en) Small digital actuator system based on fuzzy control
CN106873524A (en) A kind of Digit Control Machine Tool closed-loop control system based on PC
CN102830629B (en) Testing device and method of power electronic control system
CN100501705C (en) Tester measure and control device based on DSP and measure and control method thereof
CN110847111B (en) Method for acquiring hydropower station gate scheduling parameters based on semi-physical simulation
CN101526805A (en) PLC analog control system and analog control method thereof
CN108154742A (en) A kind of industry Internet of Things practice teaching platform
CN208621176U (en) A kind of composite material blade intrinsic frequency test platform based on OPC technology
CN202548562U (en) PLC (Programmable Logic Controller) experiment system
CN205644169U (en) Control system of marching type motor governing valve
CN107731041A (en) A kind of flight simulator electro-servo control load system
CN103676893A (en) Testing machine measurement and control system
CN206224175U (en) A kind of industrial nerve network controller
Zhang et al. Design of embedded control system based on arm9 microcontroller
CN101567136A (en) Automatic control test device based on robot platform
CN201629089U (en) All-digital servo adjusting and status display experimental apparatus
CN101699537A (en) Full-digital servo regulation and state display method and experimental apparatus
CN105892406B (en) Intelligence test and appraisal Open motion control experimental teaching unit
CN104298185B (en) A kind of computer general-purpose USB circuit controller and its implementation
CN104123442B (en) A kind of online Equivalent Model modeling method of Wind turbines active power
CN201965474U (en) Measurement and control system of electric eddy current dynamometer

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