For the data storage industry, disk drive manufacturers expand the capacity and improve the performance of computer hard drives by increasing track density (tracks per inch) and disk rotation speed (revolutions per minute). As track density increases, the distance between adjacent tracks decreases. Therefore, the allowable misalignment error between the read/write head and the track, known in the disk drive industry as misalignment, is correspondingly reduced, making the hard drive more susceptible to damage. Its operating principle necessitates the use of harsh environment-resistant hardening technologies, primarily targeting mechanical and climatic environments. For disk storage devices, the most severe mechanical and physical environments are vibration and shock. This paper employs external hardening active control theory and technology, applying electromagnetic active control technology to the vibration and shock external hardening of computer peripherals (microdisks), and constructs a digital active control system based on a DSP hardware platform.
2 Hardware Design of Digital Control System
Since TI (Texas Instruments) launched its general-purpose programmable DSP chip in 1982, DSP technology has developed rapidly.
2.1 Control System Principle
Digital signal processors (DSPs) possess real-time signal processing capabilities and powerful computing functions. The system operates by having a foundation accelerometer pick up the foundation vibration and impact acceleration signal, which is then sent to a preamplifier. The DSP samples the output signal from the charge amplifier via an analog-to-digital converter (A/D converter), performs a first integration (converting it to a velocity signal) and a second integration (converting it to a displacement signal), sums the two integration results, and then converts the sum to a digital-to-analog converter (D/A converter) before inputting it to a power amplifier. Finally, the power amplifier output signal is applied as a control voltage to the actuator, which generates a corresponding actuating force to counteract the vibration and impact from the foundation. Because the DSP integrates a 10-bit A/D converter, analog signals can be directly connected to the DSP. Figure 1 shows the block diagram of the entire digital control system.
2.2 DAC Interface and External Memory Expansion
The D/A converter used in the system is the URR-BROWN DAC7611. Since the DSP's internal 10bA/V input voltage range is 0-5V, the input signal, after A/D conversion, corresponds to a voltage signal of 0-5V in decimal (0-1023). Therefore, the DSP's input signal is no longer a symmetrical positive-negative signal. Furthermore, the DAC7611's output range is 0-4.095V, while the power amplifier's input in the subsequent stage should be zero-mean. Therefore, an operational amplifier is needed to perform level conversion on the DAC output signal.
Furthermore, the DAC7611 has very strict requirements for its clock signal. It requires the rising edge of its clock signal to occur during the transmission of each data bit. The TMS320F243's SPI (Serial Peripheral Interface) is a high-speed, synchronous serial I/O port that allows setting the number of bits (1-16 bits) of the serial data stream generated each time, and also allows programmable control over the bit transfer rate. The SPI clock output signal line SPICLK can provide four types of clock signals. One of these is a rising edge clock with a delay, allowing SPI to transmit data in the half-cycle before the rising edge, or receive data after the rising edge of the SPICLK signal. This perfectly matches the DAC7611's clock signal requirements.
Due to the limited on-chip resources of the DSP, an external RAM CY71021 was added to store data. Its read/write time is 12ns, matching the speed of the DSP. Furthermore, this chip automatically adopts a low-power operating mode when not in use. When transmitting data to the D/A converter using the DSP's serial peripheral interface, the system also uses optocouplers to isolate the digital and analog circuits. The peripheral interface circuit is shown in Figure 2.
Since the program is first executed from the on-chip FLSH program ROM after the system is powered on, the MP/MC pins must be connected in microprocessor mode.
3. Software Design of Digital Control System
3.1 Control Algorithm
After in-depth research and extensive analysis and calculation, the electromechanical dynamics model of the system is as follows:
The system's sensing and detection equations:
Where: u is the basic vibration acceleration:
c1 and k1 are the coefficients of the second and first integrals related to the foundation vibration, respectively.
Let u be the charge amplification signal of u. According to the control requirements, this system mainly uses DSP to perform the following operations:
The mean-value compensation method is used to correct the integral result, thereby achieving control of the digital system. Discretizing the above equation yields:
This obviously requires two integration operations, and the calculation process is as follows:
Where m1(n) and m2(n) are the mean values of the first and second integral operations, respectively.
3.2 System Software Design and Implementation
The main function of system header files (with the .h extension) is to map the names of the various special function registers inside the DSP to their default addresses. During assembly language execution, the DSP pointer directly accesses the addresses specified in the header file by register name. Command files (with the .cmd extension) are actually the DSP's resource configuration files. Page 0 (program space) defines the starting addresses and space lengths of each program module, as well as the definitions of on-chip and off-chip program segments and interrupt vector tables. Page 1 (data space) defines the starting addresses and space lengths of each data module, such as the definitions of on-chip and off-chip data areas for various parameters. Furthermore, it is important to adhere to the conventions governing the DSP's actual memory and storage space.
Since this system primarily communicates with its peripheral devices via the DSP's ADC and SPI modules, their operating modes need to be configured in the software design. For the on-chip ADC's operating mode: first, the ADC's startup mode should be determined, and then the ADC should achieve a sampling rate of 10kHz. To ensure an accurate sampling rate, an interrupt is generated by the DSP's internal counter as the ADC's startup method. Because the TMS320F243's machine instruction cycle is 50ns, it can run a maximum of approximately 2000 instruction cycles within two sampling intervals; otherwise, real-time computation cannot be completed. For the SPI module: first, its communication mode is set to master mode, causing data to be shifted out from the SPISIMO pin in a timing sequence; then, the number of bits of serial data transmitted each time, the clock signal mode, and the transmission rate are set. Since the DSP's external D/A device is 12 bits, while the DSP's data bus is 16 bits, the final computation result must be adjusted accordingly before being sent out via SPI.
In addition, the DSP's internal A/D converter uses values from 0 to 1023 (decimal numbers) to correspond to input voltage signals from 0 to 5V respectively. Therefore, the zero mean point should be represented by the value 511. This point should be paid special attention to during mean compensation. The system program flowchart is shown in Figure 3.
4 Conclusion
Direct electromechanical control using DSP is a relatively new technology that offers significant advantages over traditional control methods. Experiments show that DSP-based digital control systems can achieve real-time control with very small phase errors in the low-frequency range, while also handling higher frequencies, making them widely applicable. Furthermore, they exhibit good stability, high precision, and ease of controlling complex models.