Design of wind tunnel model attitude control system based on single chip microcomputer

Publisher:素雅之韵Latest update time:2013-03-15 Source: dzsc Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  1. Introduction

  A wind tunnel is a kind of pipe test equipment that can artificially generate and control airflow to simulate the flow of gas around an aircraft or object, measure the effect of airflow on the object, and observe the phenomena of the object. Wind tunnels play a very important role in aerodynamic research and aircraft design, and their development is closely related to the development of aerospace technology [1].

  Figure 1 Overall design scheme

  Most of the current wind tunnels use computers as the core and other hardware resources to complete the wind tunnel wind speed and model attitude control. This article focuses on the principle and method of using the synchro and its transmitter to replace the traditional photoelectric encoder as the angle sensor to complete the model attitude control.

  2. Overall hardware structure

  The system uses a single-chip microcomputer as a controller, a precisely positioned stepper motor as a model attitude actuator, and a high-precision angular displacement sensor as a measuring element to achieve precise control of the model. The system consists of a microcontroller, keyboard, display, attack angle and sideslip angle acquisition, attitude control, wind speed acquisition, test timing and other modules. The overall scheme is shown in Figure 1.

  2.1 Hardware composition of model attitude measurement and control unit

  The model attitude, i.e., the measurement and control of the angle of attack α and the sideslip angle β, is shown in Figure 2. The selected FB900C series angle sensor and transmitter is a single-chip system, which uses serial communication with the system single-chip. The working process is to set the angles α and β through the keyboard, measure the current angle of the system through the angle sensor and transmitter, calculate the angle to be turned, control the rotation of the two stepper motors and send it to the display.

  Figure 2 Block diagram of model attitude control system

  The system uses Atmel's AT89C52 microcontroller, which is an enhanced version of the 51 series chip with 8K Flash Rom, three 16-bit timer counters and 256 bytes of RAM.

  The microcontroller and stepper motor interface uses four lines P1.0~P1.3 to control two stepper motors. P1.0 and P1.2 are used to output square wave signals, and P1.1 and P1.3 are used to output direction signals.

  FB900C series angular position transmitter uses synchro or rotary transformer as detection element, and uses the latest detection technology to convert the angle of the rotating object into angular displacement or linear displacement after processing by microprocessor, and then output it as 4~20mA analog quantity or serial port. The transmitter uses synchro or rotary transformer combination equivalent to 8~16-bit absolute encoder measurement accuracy, and its cost performance is much higher than encoder measurement method, which is the most ideal angular position measurement module in industrial field.

  2.2 Model attitude measurement and control program design

  2.2.1 Angle measurement program design

  The measurement of the two angles α and β is the focus of the wind tunnel data acquisition and control system. The accuracy of the measured angles directly affects the control accuracy of the system. Therefore, the requirements for each subroutine in the measurement are relatively high. Since the output of the angular displacement sensor is ASCII code and the maximum data is 79 9999, the program uses floating point operation subroutines and conversion subroutines between integers and floating point numbers [2]. The flow of the angle measurement program [2] is shown in Figure 3.

  The program first obtains the direction to be measured from the accumulator and stores it in R2. If the value of R2 is wrong, the program returns directly without performing any operation. After obtaining the corresponding angular position data through the serial port, the base conversion program is called to convert the data into a floating point number. At this time, the direction value in R2 is judged to obtain the transmission ratio in that direction. After the calculation result is converted to decimal, the unit address where the data is stored is also obtained by judging the direction value in R2. [page]

  Program entry: The sensor number is stored in A.

  Program exit: α angle is stored in 51H, β angle is stored in 53H.

  Some of the procedures are as follows:

  MS: CLR EA ; Disable interrupts

  MOV R2,A ; Temporarily store sensor number

  MOV SCON,#50H ; Set the serial port mode

  MOV RCAP2H,#0FFH ; Automatically load value

  MOV RCAP2L,#0D9H       ;

  MOV TH2,#0FFH

  MOV TL2,#0D9H

  MOV T2CON,#34H ; Start the baud rate generator

  …… …… ; Send acquisition command, base conversion

  LCALL FCIV ; adjust floating point operations

  …… …… ; base conversion, data storage

  SETB EZ ; Enable interrupt

  RIGHT

  Figure 3 Angle measurement flow chart

  2.2.2 Angle control program design

  The control of the model posture in the wind tunnel is divided into two parts: one is the measurement of the current posture, and the other is the calculation of the angle that the stepper motor needs to rotate. The angle control is completed based on the accurate measurement of the current posture. The program flowchart is shown in Figure 4.

  Similar to angle measurement, the angle that the model posture needs to change is placed in the accumulator, the direction that needs to change is placed in the 22H unit, and the sign is placed in the 23H unit. The number of pulses required to drive the model to rotate a given angle and the control port of the motor in that direction are obtained by calculation.

  Some of the procedures are as follows:

  DJRUN:  JZ  AOVER

  MOV R2,A ; The angle to be rotated is stored in A

  MOV A,22H ; Model change direction[page]

  CJNE A,#0Ah,NOAJI

  LJMP ADJI ; attack angle direction (α angle)

  NOAJI: CJNE A,#0BH,ERROR5

  LJMP BDJI ; Sideslip angle direction (β angle)

  ADJI: MOV A,23H

  CJNE A,#0Ah,ADJINOZH

  LJMP ADJIZH ;α direction forward

  ADJINOZH :CJNE A,#0BH,ERROR5

  LJMP ADJIFU

  ADJIZH: SETB AAJFX ;α direction forward

  LJMP AMC_DU

  ADJIFU: CLR AAJFX ; α direction reversal

  LJMP AMC_DU

  AMC_DU:  MOV R4,#0AH         ;

  AMC60: MOV R3,#3CH; Transmission ratio

  AMC10:    SETB AAJMC

  …… …… ; Single pulse generator

  RIGHT

  (The running procedure in β direction is similar to that in α direction)

  3. Conclusion

  The author's innovation is to use a synchro and its transmitter instead of the traditional photoelectric encoder, which greatly reduces the hardware cost. This system has been successfully applied to a low-speed wind tunnel control system in a university. The range of the model's attack angle α in the wind tunnel test is -10 degrees to +25 degrees; the sideslip angle β can be selected within the range of -180 degrees to +180 degrees; the control accuracy and measurement accuracy are both 0.5 degrees.

References:

[1]. AT89C52 datasheet http://www.dzsc.com/datasheet/AT89C52_1064535.html.
[2]. ASC datasheet http://www.dzsc.com/datasheet/ASC_2307774.html.

Reference address:Design of wind tunnel model attitude control system based on single chip microcomputer

Previous article:Single-chip microcomputer control technology used in air conditioner power-on delay start protector
Next article:Design of Embedded Ethernet Interface Based on CP2200

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号