Kếtquả đánh giá

Một phần của tài liệu Thiết kế máy đo công suất cao tần (m3 22act01) (Trang 57)

Máy đo M3-22ACT01 được chế tạo, đã được thử nghiệm và kiểm tra đo lường tại phòng Đo lường Vô tuyến điện, Trung tâm Đo lường, đã đạt các chỉ tiêu kỹ thuật đã đề ra.

51

SỐ LIỆU KIỂM TRA ĐO LƢỜNG THỬ NGHIỆM M3-22ACT01

Biên bản kiểm tra các tham số đo lường đã được thực hiện tại trung tâm đo lường/Cục TC- ĐL-QL

57

4.3 So sánh với máy đo công suất có tính năng tƣơng đƣơng Các chỉ tiêu Máy đo công suất cao tần

M3-22ACT01

Máy đo công suất cao tần do Nga sản xuất (M3-22A)

Chế độ chỉnh “0” Chỉnh “0” bằng tay và chỉnh

“0” bằng phần mềm Chỉnh “0” bằng tay

Hiệu chỉnh giá trị công

suất cần đo Có Không

Ghép nối máy tính Có Không

Thang đo

Sử dụng một thang đo duy nhất do đó loại trừ được sai số lớn khi đo công suất nhỏ hơn 1/3 giá trị cuối thang

Sử dụng 4 thang đo do đó gặp sai số lớn khi đo các giá trị công suất nhỏ hơn 1/3 giá trị cuối thang đo

Sai số cơ bản cho phép ở giới hạn đo công suất từ 10 W đến 10 mW.

Sai số cơ bản (5,0 % giá trị thiết lập  0,025 % toàn thang) đối với các đầu đo M5- 29, M5-30, M5-31, M5-32

Sai số cơ bản cho phép (6,0 % giá trị thiết lập 

0,04 % toàn thang) đối với các đầu đo M5-29, M5-30, M5-31, M5-32

58

KẾT LUẬN 1. Kết quả đạt đƣợc

Trong quá trình thực hiện luận văn tác giả đã thu được những kết quả sau:

Tìm hiểu tổng quan về máy đo công suất; các phương pháp đo công suất cao tần. Nghiên cứu thiết kế được máy đo công suất cao tần (M3-22ACT01) trên cơ sở vi xử lý và các vi mạch tích hợp cao có tính năng đo tương đương và một số tính năng vượt trội. M3-22ACT01 đã được ứng dụng kỹ thuật tuyến tính hoá đặc tính của các bộ biến đổi M5-29/30/31/32. M3-22ACT01 có thể làm việc độc lập hoặc kết nối với máy tính để tiếp tục xử lý kết quả đo như, tuyến tính hoá đặc tính các bộ biến đổi, tính toán, hiển thị, lưu trữ kết quả đo… Thiết kế, xây dựng được chương trình máy tính để kết nối và xử lý kết quả đo: Máy tính là máy đo công suất như M3-22ACT01 và thêm chức năng tính sai số khi được truyền chuẩn cho nó, sai số khi dùng nó để kiểm tra các máy đo công suất khác, lưu trữ kết quả đo.

Trình bày về phương pháp kiểm tra đo lường dùng cho máy đo công suất cao tần M3-22ACT01.

Trình bày đánh giá và so sánh với máy đo công suất cao tần do Nga sản xuất(M3-22A).

Máy đo M3-22ACT01 được chế tạo, đã được thử nghiệm và kiểm tra đo lường tại phòng Đo lường Vô tuyến điện, Trung tâm Đo lường, đã đạt các chỉ tiêu kỹ thuật đã đề ra.

2. Hƣớng phát triển của đề tài:

Thiết kế máy đo tích hợp nhỏ gọn hơn để tiện cơ động. Không cần màn hình hiển thị LCD mà phần mềm được cài trên máy tính như một số đầu đo công suất của các hãng tiên tiến trên thế giới như R&S, agilent...

59

TÀI LIỆU THAM KHẢO

- Thuyết minh kỹ thuật và hướng dẫn sử dụng máy đo công suất M3-22A. - Thuyết minh kỹ thuật và hướng dẫn sử dụng các bộ biến đổi công suất M5- 29/30/31/32.

- Thuyết minh kỹ thuật và hướng dẫn sử dụng các bộ chuẩn công suất KMC- 17A/23A//28A/35A.

- Fundamental of RF and Microwave power measurement (Agilent, application note 1449-1).

PHỤ LỤC 1: MỘT SỐ LƢU ĐỒ THUẬT TOÁN M3-22ACT01 ASSEMBLY

1.1. Thuật toán chia 16 bit (16 bít division) 1.2. Thuật toán lấy số dư (getting the remainder)

1.3. Thuật toán phát hiện phím được bấm và chống nảy xung cơ khí 1.4. Chương trình nguồn M3-22ACT01

1.1. Thuật toán chia 16 bit (16 bít division) Enter Clr R2 (R2 = 0) C = 0 Acc – R1 R2 + 1

Move R2 tới Acc Giảm R2 R3 - 1 C = 1 R3 = FFH Return no yes yes no yes

1.2. Thuật toán lấy số dƣ (getting the remainder) yes no no yes yes yes no no Enter R3 = Mechanical pulse Gọi phát hiện phím bị bấm Có phím bị bấm Giảm R3 R3 = 0

Cất vào stack mã của phím bị bấm R3 = Mechanical pulse Gọi phát hiện phím bị bấm Phím vẫn bị bấm Giảm R3 R3 = 0 Khôi phục mã của phím bị bấm trong ACC Return Use : GET_KEY

1.3. Thuật toán phát hiện phím đƣợc bấm và chống nảy xung cơ khí yes no yes Enter Carry Flag = 1 C = Mode C =1 C = Shift C =1 C = Increment C=1 C =1 C = enter C =1 Return Acc = 1= Mode Acc = 2 Shift Acc = 3 = increment Acc = 4 = enter no yes no no Phím bị bấm c = 0 Phím không bị bấm c = 1 Output :

Acc = 1 = mode is pressed Acc = 2 = shift is pressed Acc = 3 = incr is pressed Acc = 4 = enter is pressed

A c c = 2 = s h i f t i s p r e s s e d A c c = 3 = i n yes

1.4 Chƣơng trình nguồn M3-22ACT01

;--- --- ---

NAME M322A01_DRIVER

M322A01_DRIVER SEGMENT CODE

PUBLIC ProgSensKefrmain ;--- --- --- RSEG M322A01_DRIVER USING 0 ;--- --- ---

; Data = (data.1 + data.2 + ...+ data.n)/n; n=number of Average. received data is strait binary format

; This program receivers data by serial interface from 02 IC ADS7807 (16bit ADC) to 89C51 by polling reading on pin P3.3 of 89C51

; Use P0 for controling the LCD0802, use P1 for controling 02 IC ADS7807. ; After calculation and correcting by the frequency relation,

; the data is converted from Hexa to decimal format and then to ASCII to display by LCD0802.

;

; ADS7807 use external clock, internal reference voltage 2.5V and Vin = (0- 4)V.

; SB/STB = High; CS = Low; (EXT/INT = High (clock of reading is external) then DataCLK=input from P1.2 of 89C51.

; R/C = Input from P1.0 of 89C51 ((CS=Low and Busy=High and R/C=Falling edge anable new convertion),

; (CS=low and R/C= rising edge that enable the parallel ouput)).

; BUSY = output (Busy=low that means convertion proccess, Busy=High then data is ready to read)

; DATACLK = input from P1.2 of 89C51 (DATACLK=HIGH then read the a bit from 16 bit of data; Byte=LOW then don't read Data).

; Display data = 48bit = 12 decimal digits (in this case we display only 4 first high digits).

; 'Q' is use to signal the finish of serial transfer cycle Uk and U1p

;************************************************************** **********************

org 00h

jmp ProgSensKefrmain ; jump to main program

; this program send message "M5-29"/M5-30/M5-31/M5-32/M5-42" for displaying on LCD0802

; r0 as input (get from SENSOR01.A51)

; Use: IN_HEX/GET_KEY; SENSOR01.A51 (selection 01 from 05 sensors) ; Use: COMMAND and DATA_DISPLAY (for controling LCD)

; Use: r1=addr of Ram buffer for displayed characters; r2=index of message table; Acc=temporary arguments

; input: r0 = Mode/shift/incr/enter = 1/2/3/4 ; output: r0 = 0/1/2/3/4 = M5-29/30/31/32/42

; output: "M5-29/30/31/32/42" and their resistance "75/75/100/240/400 om" are displayed on LCD ;************************************************************** ********************** mode equ P3.2 shift equ P3.3 increment equ P3.4 enter equ P3.5 mechanicPulse equ 200d R75om equ 75d R100om equ 100d R240om equ 240d R400om equ 400d

Kvalue equ 6Ch ; the Ram address of sensor effective coefficient Ke (from sensor calibration)

Rvalue_L equ 6Dh ; the Ram address of low by of R0ther (R0=thermistor resistance when bridge is balanced).

Rvalue_H equ 6Eh ; the Ram address of high by of R0ther (R0=thermistor resistnce when bridge is balanced).

;Messagebuffer1 equ 40h ; message type of sensor during the sensor selection

;Messagebuffer2 equ 30h ; frequency message during the measurement

freqTabIndex equ 35h ; the Ram address of index (r1) of sensor effective coefficient Ke and frequency

SensorSelect equ 34h ; the Ram address of sensor table (r0)

FreqMesBuffer equ 36h ; first Ram address of frequency buffer for displaying (r2).

SensorMesbuffer equ 40h ; message type of sensor during the sensor selection ;CharacDispAddr equ RS0802 Bit P0.0 RW0802 Bit P0.1 En0802 Bit P0.2 Status0802 Bit P2.7 Data0802 equ P2

Up equ 7Fh ; (Up high=(7Eh); Up low=(7Fh)).

U1p equ 79h ; (U1p = Up + deltaU = voltage after calibration for calculation Power P).

Uk equ 7Dh ; (high Uk=(7Ch); Low Uk=(7Dh)).

TempMem qu 20h ; 60h ; Temporary Memmory on RAM for

temporary saving the arguments

NumBitLoop equ 08h ; The number of loading bits from ADS7807 on 01 serial loading loop

delayBetweenUkUp equ 500d ; the delay time between Uk sample and Up sample

deltaU equ 7Bh ; (deltaU high=(7Bh); deltaU high low=(7Ah)). deltaUsign Bit 71h ; sign of delta U (if deltaU is positive then (71h)=0, if deltaU is negative then (71h)=1

UkAdjective equ 7AFh ; Uk=7AFh=correction voltage for correcting acurracy of ADS7807 (0.12V*1000000/61)d ; 61mkV= LSB of ADS7807 (07AFh~0.02V)

UpAdjective equ 00h ; Up correction voltage by the program for correcting acurracy of ADS7807 (0.02V*1000000/61)d ; 61mkV=LSB of ADS7807 (0147h=0.02V)

;statable4051 equ 1000d ; the time after selecting chanel 1/0 of CD4051 for reading Uk/Up (waiting for statable of 4051)

R0therx4_H equ 6Ah ; the Ram address of high byte of 4*R0ther R0therx4_L equ 6Bh ; the Ram address of low byte of 4*R0ther

AddrBCD equ 70h ; (address of converted BCD numbers and for subroutine "Display" by LCD).

Addr1stline equ 80h ; (address of colume and line of displaying of LCD0802,

; 80h is the addr of colume 1, 1st line of LCD0802)

Addr2ndline equ 0C0h ; (C0h is the addr of colume 1, 2nd line of LCD0802).

Addr3ndline equ 94h ; (C0h is the addr of colume 1, 3th line of LCD0802).

Addr4ndline equ 0D4h ; (C0h is the addr of colume 1, 4th line of LCD0802).

DecimalBase equ 50h ; (the beginning address of Decimal bases = 10E13,10E12,...10E1,!0E0,10E-1

; for converting 6 hexa byte to 15 BCD numbers)

Calib Bit P0.6 ; Automatic calibration key=P0.6 (P0.6=0=automatic calibration,

; P0.6=1 then calculate the Up1=Up+deltaU and calculate the

RCtime equ 2d ; the time of negative R/C for starting convertion of ADS7807

RC7807Up Bit P1.0

BUSY7807Up Bit P1.1 ; DataReading = HIGH of BUSY of ADS7807 DATACLK7807Up Bit P1.2

SDATA7807Up Bit P1.3

RC7807Uk Bit P1.4

BUSY7807Uk Bit P1.5 ; DataReading = HIGH of BUSY of ADS7807 DATACLK7807Uk Bit P1.6

SDATA7807Uk Bit P1.7

NumOfAverage equ 20d ; number of average N 30 = number of data loading from P1

sampletimer equ 200d ; frequency of data sample = 100mks

RamVolume equ 80h ; the Volume of Ram = (00 to 7F)h = 128 byte Displaytimer equ 500d ; the time of display = the time between averages = 500mks

countAverage equ 60h ; addr of Ram memory for counting the number of loading data from P1

;************************************************************** ********************** ;jmp ProgSensKefrmain ;************************************************************** ********************** ProgSensKefrmain: clearRam: mov r0, #00h ; mov a, #RamVolume ;

Clearloop: mov @r0,#00h ; Clear content (@r0)

cjne r0, #RamVolume, clearloop ; repeat clearing until all volume of ram is cleared

mov r0, #00h ; Clear content of r0 mov a, #00h ; Clear content of a

mov Kvalue, #1d ; for simulation only mov Rvalue_H, #00d ; for simulation only mov Rvalue_L, #100d ; for simulation only

;************************************************************** **********************

call mainMessage1; select the sensor and sensor message on LCD; save it's resisstance to Ram

call main

jmp mainpolling ; program to load Uk, Up then calculate Power and display on LCD

;stophere: jmp stophere ; for simulation only

;************************************************************** **********************

; org 00h

Mainmessage1:

call init0802 ; start LCD and cussor on the 1st line, 1st colum

call Sensorselection ; call subroutine SENSOR01.a51(input=mode, shift, enter keys; ouput=r0=0/1/2/3/4)

;here: jmp here

;************************************************************** **********************

; Subbroutine for seting address to be display: COMMAND:

CALL READY0802 ;

CLR RS0802 ; clear bit for RS0802? (select instruction register of LCD0802?)

CLR RW0802 ; clear RW0802? (Write operation to LCD0802) SETB EN0802 ; Enable LCD0802? (High then low?)

CLR EN0802 ; RET ;

; Subbroutine for displaying digits on LCD DATA_DISPLAY:

CALL READY0802 ;

MOV Data0802,A ; Move data to be display to LCD0802Data port=P2 (from Acc to Data Bus of LCD0802)

SETB RS0802 ; set bit for RS0802? (select data register of LCD0802?) CLR RW0802 ; clear RW0802? (Write operation to LCD0802)

SETB EN0802 ; Enable LCD0802? (High then low?) CLR EN0802 ;

RET ;

; Subbroutine for handsaking with LCD0802 READY0802:

SETB Status0802 ;Set P2.7 as I/O port for reading busy flag DB7 of LCD0802

CLR RS0802 ;

SETB RW0802 ;

BACK: SETB EN0802 ;

JB Status0802, BACK; RET ; ;************************************************************** ********************** ; Start up LCD0802 ;************************************************************** ********************** Init0802:

Mov A,#38H ; Choose the matrix display 2 line 5x7

;manualSimul1: Jb P0.5, manualSimul1 ; manual stop here for watching the program

Call COMMAND ;

Mov A,#0EH ; Display the monitor and the pointer CALL COMMAND ;

Mov A,#1H ; Clear the monitor

;manualSimul2: Jb P0.5, manualSimul2 ; manual stop here for watching the program

CALL COMMAND ;

Mov A,#80H ; Come back the fisrt line 1

;manualSimul3: Jb P0.5, manualSimul3 ; manual stop here for watching the program

CALL COMMAND ; RET

;************************************************************** **********************

SensorMessage: ; this subroutine send message type of sensor during the sensor selection

push 00 ; save ro into stack push 01 ; save r1 into stack call init0802

mov r1, #SensorMesbuffer ; r1:=first addr of Ram Buffer mov r0,#Addr3ndline ; the addr of colume 1, 3th line of LCD0802=94h

; the addr of 2nd line and 3th colum of LCD to be

display sensor type DispLoop:

mov a, r0 ; Acc:= addr of 2nd line and 3th colum of LCD call COMMAND ; send this addr for dislaying to LCD

mov a, @r1 ; load the character to be displayed

cjne a, #'z', CharDisp; is the last character? ('0' is the end of ram buffer) jmp Loopfinish

call DATA_DISPLAY inc r0

inc r1

jmp DispLoop Loopfinish:

pop 01 ; load back r1 from stack pop 00 ; load back ro from stack ret ;

;************************************************************** **********************

SensorMessage1: ; this subroutine send message type of sensor during the measurement

push 00 ; save ro into stack push 01 ; save r1 into stack ; call init0802

mov r1, #SensorMesbuffer ; r1:=first addr of Ram Buffer

mov r0,#Addr3ndline ; the addr of colume 1, 3th line of LCD0802=94h

; the addr of 2nd line and 3th colum of LCD to be

display sensor type DispLoop1:

mov a, r0 ; Acc:= addr of 2nd line and 3th colum of LCD call COMMAND ; send this addr for dislaying to LCD

mov a, @r1 ; load the character to be displayed

cjne a, #'z', CharDisp1; is the last character? ('0' is the end of ram buffer) jmp Loopfinish1 CharDisp1: call DATA_DISPLAY inc r0 inc r1 jmp DispLoop1 Loopfinish1:

pop 01 ; load back r1 from stack pop 00 ; load back ro from stack ret ;

;************************************************************** **********************

MainBuffer:

mov r1, #SensorMesbuffer; first addr of ram message buffer into register r1 mov a, #00h ; clear Acc

mov r2,#01h ; init r2, that means r2 points to the first index of table getCharacter1:

; push 00h ; save r0 into stack ; mov r0, a

; push 00h ; save Acc into Ram

call MessageTable ; subroutine for selection of message sensor table cjne a,#'Q',RamSaving1;

; pop 00h ; load back Acc from stack

; mov a, r0 ; return value of Acc into Acc ; pop 00h ; load back r0 from sack jmp finish

RamSaving1:

mov @r1,a ; save the sensor ASSCII codes of characters into ram

Một phần của tài liệu Thiết kế máy đo công suất cao tần (m3 22act01) (Trang 57)

Tải bản đầy đủ (PDF)

(119 trang)