CN108039982B - DSP platform control system bandwidth measuring method based on network port - Google Patents

DSP platform control system bandwidth measuring method based on network port Download PDF

Info

Publication number
CN108039982B
CN108039982B CN201711250745.3A CN201711250745A CN108039982B CN 108039982 B CN108039982 B CN 108039982B CN 201711250745 A CN201711250745 A CN 201711250745A CN 108039982 B CN108039982 B CN 108039982B
Authority
CN
China
Prior art keywords
frequency
sweep
data
excitation signal
signal
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.)
Active
Application number
CN201711250745.3A
Other languages
Chinese (zh)
Other versions
CN108039982A (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.)
Tianjin Jinhang Institute of Technical Physics
Original Assignee
Tianjin Jinhang Institute of Technical Physics
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 Tianjin Jinhang Institute of Technical Physics filed Critical Tianjin Jinhang Institute of Technical Physics
Priority to CN201711250745.3A priority Critical patent/CN108039982B/en
Publication of CN108039982A publication Critical patent/CN108039982A/en
Application granted granted Critical
Publication of CN108039982B publication Critical patent/CN108039982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Measurement Of Resistance Or Impedance (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a bandwidth measuring method of a DSP platform control system based on a network port, which belongs to the field of bandwidth measurement of an automatic control system and solves the problems that a time domain method is not accurate enough in measurement of system bandwidth, a frequency domain method or a system is large, the manufacturing cost is high or a signal distortion method is caused by the restriction of output conditions. The sine excitation signal for frequency sweeping is generated by the DSP, and an interface is not required to be reserved for connecting a dynamic signal analyzer with a large volume; the frequency sweep excitation signal, the control signal and the frequency sweep frequency value are output by the network port, so that the signal is free of distortion during high-frequency sweep; the upper computer based on the network port outputs the received data according to a set format, so that the amplitude difference and the phase difference of output signals are conveniently compared, and the frequency point corresponding to the system bandwidth is clear at a glance.

Description

DSP platform control system bandwidth measuring method based on network port
Technical Field
The invention belongs to the field of automatic control system bandwidth measurement, and relates to a system bandwidth measurement method based on a network port in a DSP platform control system.
Background
When the response speed requirement of the control system in the follow-up stable platform to the signal is high, a high bandwidth needs to be designed for the control system.
The control system using the DSP as the main control chip can determine the system bandwidth by a frequency response or step response method. Generally, the step response can only estimate the bandwidth value through an empirical formula, and for the condition that a controlled object has resonance, the method cannot accurately determine whether the resonance frequency point is in the working bandwidth, so that the control system has the risk of generating oscillation during normal working. The system frequency response test can be conveniently completed by depending on the dynamic signal analyzer, only the parameters of the dynamic signal analyzer are required to be set according to the value range of the amplitude of the input and output signals of the system, but the premise is that a signal input and output interface is reserved on a platform to ensure that the control system is connected with the dynamic signal analyzer. The method is simple in connection and convenient to implement, but the output rate of the sweep frequency data is limited by the baud rate of the serial port, the output control signal is distorted when the sweep frequency is higher, and the bandwidth value of the system cannot be measured correctly.
In the above method for determining system bandwidth, the time domain method is not accurate enough to measure the system bandwidth, and the frequency domain method or system is large, high in cost or limited by output conditions, resulting in signal distortion.
Disclosure of Invention
Aiming at the problems, the invention provides a method for measuring the bandwidth of a DSP platform control system based on a network port, which is used for realizing the measurement of the bandwidth of the control system, the high transmission rate of the network port can avoid signal distortion, the accuracy of the measurement of the system bandwidth is ensured, and the practical result shows that the method for measuring the system bandwidth has the characteristics of simple connection and convenient realization.
The technical solution of the invention is as follows: a DSP platform control system bandwidth measuring method based on network port includes the following contents:
(1) DSP generating an excitation signal
The DSP generates a sweep frequency excitation signal, and the excitation signal is a sine excitation signal;
(2) the control system sweeping frequency according to the excitation signal
The control system calculates a motor control signal, referred to as a control signal for short, according to an input excitation signal, the control signal drives a load tracking excitation signal to perform sinusoidal frequency sweeping motion, the excitation signal, the control signal and the frequency sweeping frequency are recorded periodically in the frequency sweeping process, and the excitation signal, the control signal and the frequency sweeping frequency are packaged as frequency sweeping data;
(3) outputting the sweep frequency data through the network port
Taking the excitation signal as an instruction value and the control signal as a response value, organizing the instruction value, the response value and the frequency sequence into a network port data frame, and sending the network port data frame to an upper computer according to a DSP calculation period;
(4) the upper computer receives and calculates the frequency sweep data
The upper computer sends a frequency sweep control command and data, receives frequency sweep data, completes data calculation according to a set protocol, and stores the data according to a column vector format to form a data file;
(5) sweep frequency data analysis
And importing the data file into a matlab to draw three curves of sweep frequency data, and when the response value is attenuated to 0.707 times of the command value, taking the corresponding frequency value as the bandwidth frequency omega Hz.
Preferably, the method for measuring the bandwidth of the DSP platform control system based on the internet access is characterized in that the calculation frequency of the DSP is determined according to the design bandwidth of the control system, and the calculation frequency is 10 times of the design bandwidth of the control system.
Preferably, the method for measuring bandwidth of DSP platform control system based on internet access is characterized by the following formula: generating a sinusoidal excitation signal and calculating a control signal by Asin (2 pi ft), wherein ControlData is the control signal, A is the amplitude of the excitation signal, f is the frequency of the sweep sinusoidal signal, and t is the calculation period of the DSP.
Preferably, the method for measuring bandwidth of DSP platform control system based on internet access is characterized in that the excitation signal amplitude a and the frequency sweep start frequency value fstartFrequency value f of end of sweep frequencystopAnd the sweep frequency change step length delta f is set by the upper computer and is sent to the DSP.
Preferably, the method for measuring bandwidth of the DSP platform control system based on the internet access is characterized in that each frequency point performs p times of sinusoidal frequency response tests in the frequency sweeping process.
Preferably, the method for measuring bandwidth of DSP platform control system based on internet access is characterized in that the excitation signal amplitude a and the frequency sweep start frequency value fstartFrequency value f of end of sweep frequencystopAnd the sweep frequency change step length delta f is data sent by the upper computer, and the upper computer sends sweep frequency control commands of sweep frequency start and sweep frequency end.
Preferably, the method for measuring bandwidth of DSP platform control system based on internet access is characterized by saving and forming a data file according to a column vector format: the instruction value is in the first column, the response value is in the second column and the frequency value is in the third column.
The method realizes the bandwidth measurement of the control system by utilizing a method that a DSP generates a sine sweep frequency excitation signal and outputs a control signal to an upper computer through a network port, and is characterized in that the sine excitation signal for sweeping the frequency is generated by the DSP without reserving an interface to connect a dynamic signal analyzer with a larger volume; the frequency sweep excitation signal, the control signal and the frequency sweep frequency value are output by the network port, so that the signal is free of distortion during high-frequency sweep; the upper computer based on the network port outputs the received data according to a set format, so that the amplitude difference and the phase difference of output signals are conveniently compared, and the frequency point corresponding to the system bandwidth is clear at a glance.
Compared with the prior art, the invention has the beneficial effects that:
1) and the DSP is adopted to independently generate the excitation signal, so that the use of instruments and equipment is saved, and the scale of an experimental system is reduced.
2) And the network port is used for completing data transmission, so that the defect of low serial port baud rate is avoided, and the high-speed data transmission ensures that an output signal is not distorted in the frequency sweeping process.
3) The amplitude and the frequency of the frequency sweep signal can be adjusted through software of an upper computer, so that an experimental system can formulate a frequency sweep scheme according to an actual control system, and the method has strong universality.
Drawings
Fig. 1 is a system composition of a DSP platform control system bandwidth measurement method based on a network port.
Fig. 2 is a flow chart of excitation signal generation.
Fig. 3 is a diagram of network data frame composition in a DSP.
Fig. 4 is a flow chart of upper computer software data processing and saving.
Detailed Description
The present invention is described in further detail below.
A DSP platform control system bandwidth measuring method based on network port includes the following steps:
(1) DSP generating sinusoidal excitation signals
The DSP calculation frequency is determined according to the control system design bandwidth and fragrance concentration sampling theorem, and the accuracy of the frequency sweeping result can be ensured when the calculation frequency is 10 times of the design bandwidth. According to the formula: generating a sinusoidal excitation signal and calculating a control signal by Asin (2 pi ft), wherein ControlData is the control signal, A is the amplitude of the excitation signal, f is the frequency of the sweep sinusoidal signal, t is the calculation period of the DSP, A, fstartStarting frequency value, fstopSum of end frequency valuesSetting the step length delta f by an upper computer and sending the step length delta f to a DSP, and carrying out p times of sine frequency response tests on each frequency point in the frequency sweeping process; and performing multiple sine frequency response tests on each frequency point in the frequency sweeping process.
(2) The control system sweeping frequency according to the excitation signal
The control system calculates a motor control signal according to an input excitation signal, the control signal drives a load to track the excitation signal to perform sinusoidal frequency sweeping motion, the excitation signal, the control signal and the frequency sweeping frequency are recorded periodically in the frequency sweeping process, and the excitation signal, the control signal and the frequency sweeping frequency are packaged as frequency sweeping data;
(3) outputting the sweep frequency data through the network port
Taking the excitation signal as an instruction value and the control signal as a response value, organizing the instruction value, the response value and the frequency sequence into a network port data frame, and sending the network port data frame to an upper computer according to a DSP calculation period;
(4) the upper computer receives and calculates the frequency sweep data
The upper computer is completed by adopting CSocket type based on MFC, sends control command and data by using Sendto function in UDP protocol, receives sweep frequency data by OnReceive function, completes data resolving according to established protocol, and stores the data to file according to column vector format;
(5) sweep frequency data analysis
And importing the data file into a matlab to draw three curves of sweep frequency data, and when the response value is attenuated to 0.707 times of the command value, taking the corresponding frequency value as the bandwidth frequency omega Hz.
The following contents are also provided:
(1) the system applying the method consists of three parts: host computer, DSP and equipment under test. The upper computer is responsible for receiving frequency sweep and resolving frequency sweep data, and writing the data into a file according to a specified format; the DSP control system is responsible for generating a sweep frequency excitation signal, calculating a motor control signal according to the excitation signal to drive the motor, and meanwhile organizing sweep frequency data to be sent to an upper computer; and the tested equipment receives the motor control signal and tracks the excitation signal according to the control signal to finish the frequency sweeping action. The system composition is shown in FIG. 1;
(2) exciting letterThe signal is generated as shown in FIG. 2, and the current frequency f of the excitation signal is calculated by using f and Δ fcUsing fcCalculating the period T of the sinusoidal excitation signal0When T is0When the change occurs, N is equal to 0, M is equal to 0, and T is equal to Nt, wherein N is the number of DSP calculation cycles, 1 is added in each calculation, MS is the frequency response number, and 1 is added in each sine cycle, namely when T is equal to T0M plus 1 when M ═ p, fc=fc+ Δ f, implementing a frequency response signal of varying frequency every p sinusoidal cycles;
(3) the sweep frequency instruction value A in the sweep frequency datacResponse value AbAnd the sum frequency value F is multiplied by the scale value 10 according to the reserved precision requirementxSequentially writing the network port and sending a buffer array SendData [ m ]]Sending the data frame to an upper computer through a network port according to the DSP calculation period, wherein the data frame composition format is shown in figure 3;
(4) the process of receiving and resolving sweep frequency data by upper computer software is shown in fig. 4, and the specific implementation method is as follows: the upper computer software is based on a UDP protocol, sends a sweep starting command by using a Sendto () function in a Socket, sends A, f and delta f, receives network data by using an OnReceive () function in the Socket, unpacks the network data to obtain a frequency instruction value, a response value and a frequency value, and respectively takes a scale value of 10xTo obtain Ac、AbAnd F, writing the data into the ScanData. txt of the data file column by column vector by using the Write () function in the CFile class, wherein AcIs a first column, AbIs the second column and F is the third column.
(5) Importing the ScanData. txt file into matlab, drawing three curves of sweep frequency data, and observing Ab=0.707×AcThe time frequency value is denoted as FωI.e. the control system bandwidth value.

Claims (3)

1. A DSP platform control system bandwidth measuring method based on network port is characterized in that the method comprises the following steps:
(1) DSP generating an excitation signal
The DSP generates a sweep frequency excitation signal, and the excitation signal is a sine excitation signal; determining the calculation frequency of the DSP according to the design bandwidth of the control system, wherein the calculation frequency is 10 times of the design bandwidth of the control system;
generating a sinusoidal excitation signal by Asin (2 pi ft) and calculating a control signal, wherein ControlData is the control signal, A is the amplitude of the excitation signal, f is the frequency of the sweep sinusoidal signal, and t is the calculation period of the DSP;
excitation signal amplitude A and sweep frequency starting frequency value fstartFrequency value f of end of sweep frequencystopThe sweep frequency change step length delta f is set by the upper computer and is sent to the DSP;
carrying out p times of sine frequency response tests on each frequency point in the frequency sweeping process; the frequency sweep excitation signal, the control signal and the frequency sweep frequency value are output by the network port;
outputting the control signal to an upper computer through a network port;
(2) the control system sweeping frequency according to the excitation signal
The control system calculates a motor control signal, referred to as a control signal for short, according to an input excitation signal, the control signal drives a load tracking excitation signal to perform sinusoidal frequency sweeping motion, the excitation signal, the control signal and the frequency sweeping frequency are recorded periodically in the frequency sweeping process, and the excitation signal, the control signal and the frequency sweeping frequency are packaged as frequency sweeping data;
(3) outputting the sweep frequency data through the network port
Taking the excitation signal as an instruction value and the control signal as a response value, organizing the instruction value, the response value and the frequency sequence into a network port data frame, and sending the network port data frame to an upper computer according to a DSP calculation period;
(4) the upper computer receives and calculates the frequency sweep data
The upper computer sends a frequency sweep control command and data, receives frequency sweep data, completes data calculation according to a set protocol, and stores the data according to a column vector format to form a data file; the upper computer based on the network port outputs the received data according to a set format;
(5) sweep frequency data analysis
And importing the data file into a matlab to draw three curves of sweep frequency data, and when the response value is attenuated to 0.707 times of the command value, taking the corresponding frequency value as the bandwidth frequency omega Hz.
2. Root of herbaceous plantThe method as claimed in claim 1, wherein the excitation signal amplitude A and the sweep start frequency value f are used to measure the bandwidth of the DSP platform control systemstartFrequency value f of end of sweep frequencystopAnd the sweep frequency change step length delta f is data sent by the upper computer, and the upper computer sends sweep frequency control commands of sweep frequency start and sweep frequency end.
3. The DSP platform control system bandwidth measuring method based on the network port as claimed in claim 1, wherein the data file is saved and formed according to column vector format: the instruction value is in the first column, the response value is in the second column and the frequency value is in the third column.
CN201711250745.3A 2017-12-01 2017-12-01 DSP platform control system bandwidth measuring method based on network port Active CN108039982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711250745.3A CN108039982B (en) 2017-12-01 2017-12-01 DSP platform control system bandwidth measuring method based on network port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711250745.3A CN108039982B (en) 2017-12-01 2017-12-01 DSP platform control system bandwidth measuring method based on network port

Publications (2)

Publication Number Publication Date
CN108039982A CN108039982A (en) 2018-05-15
CN108039982B true CN108039982B (en) 2021-09-10

Family

ID=62094653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711250745.3A Active CN108039982B (en) 2017-12-01 2017-12-01 DSP platform control system bandwidth measuring method based on network port

Country Status (1)

Country Link
CN (1) CN108039982B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109212413B (en) * 2018-08-14 2021-02-26 瑞声科技(新加坡)有限公司 Linear motor bandwidth measuring method
CN109445769B (en) * 2018-10-16 2021-08-06 天津津航技术物理研究所 Test software development method for dynamic loading communication protocol based on database
CN109472846B (en) * 2018-12-27 2022-11-29 燕山大学 Method for obtaining bode diagram by processing sweep frequency data by MATLAB
CN112558586A (en) * 2020-11-30 2021-03-26 天津津航技术物理研究所 Embedded software-based frequency sweep test method for airborne stable platform
CN117516666B (en) * 2023-11-16 2024-06-04 北京首科实华自动化设备有限公司 Quality factor measuring equipment and method for coriolis flowmeter

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104483582B (en) * 2014-12-29 2017-04-26 宁波海得工业控制***有限公司 Servo driver bandwidth testing platform and method
CN104993764B (en) * 2015-07-07 2017-11-17 江西洪都航空工业集团有限责任公司 Based on a kind of control method of the electric machine controller of parameter self-tuning
CN105044513A (en) * 2015-07-27 2015-11-11 中国科学院光电技术研究所 Quick frequency characteristic test system
CN106569476B (en) * 2016-10-20 2019-01-11 西安坤蓝电子技术有限公司 A kind of self-detection method of antenna natural frequency of shafting and control system bandwidth
CN107015086A (en) * 2017-05-12 2017-08-04 珠海格力节能环保制冷技术研究中心有限公司 Test method, device, system and the equipment of bandwidth
KR101978555B1 (en) * 2017-05-15 2019-05-15 한국과학기술원 Antenna radiation pattern measurement system using frequency modulated continuous wave and method thereof

Also Published As

Publication number Publication date
CN108039982A (en) 2018-05-15

Similar Documents

Publication Publication Date Title
CN108039982B (en) DSP platform control system bandwidth measuring method based on network port
CN109324248B (en) Integrated vector network analyzer for data domain analysis and testing method thereof
CN103868530B (en) A kind of method of testing of closed-loop fiber optic gyroscope angular acceleration tracking performance
CN102645585A (en) Synchronous rapid measuring method and device for ultralow frequency sinusoidal signal phase difference
CN103528782A (en) Thin-walled structure part vibration test device and method based on piezoelectric ceramic vibration exciter
CN105425128B (en) A kind of partial discharge of transformer ultrasound examination and accurate positioning device and method
CN102661782B (en) Rapid measurement method and device of super-low-frequency vibration parameter quantity value
CN108196215A (en) A kind of DC electronic transformer delay time test method and device
CN102004267B (en) Precision measurement system and method of seismic detector
CN105353789A (en) Continuous vibration signal time history replication control method
CN103528634B (en) A kind of coriolis mass flowmeters cloud transmission digital signal processing device and method
CN102809687B (en) Digital measurement method for alternating-current frequency
CN109407033A (en) A kind of calibration equipment of direct current instrument transformer transient state tester
CN110542811A (en) Link delay testing method, device and system of direct current control protection system
CN113676086A (en) Permanent magnet synchronous motor parameter self-identification device and method
CN102095929A (en) Method for rapidly measuring frequency of alternating-current signals
JP2009092640A (en) System, circuit, and method of measuring parasitic capacitance inside of automatic inspection facility precisely
CN106443185B (en) A kind of measurement method and device of the impedance of three-phase alternating current system
JPH05209781A (en) Ultrasonic transmitter/receiver
JPH11202003A (en) Rms converter, method and apparatus for measuring rms of power line signal at high rate
CN104457792B (en) A method of measuring optic fiber gyroscope graduation factor under without mechanical rotation condition
CN202770912U (en) Diverter tester
CN109510543A (en) A kind of measuring method of servo motor load inertia
CN111551785B (en) Frequency and harmonic detection method based on unscented Kalman filter
CN107861046A (en) Circuit board short circuit point measuring equipment and method based on TDR technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant