⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chl_defs.h

📁 电力系统中的保护装置全部代码
💻 H
字号:
 
/************************************************************************/
/*                                                                      */
/* FILE NAME                                            VERSION         */
/*                                                                      */
/*      CHL_defs.h                                      PLUS  1.0    	*/
/*                                                               	*/
/* COMPONENT                                                            */
/*                                                                      */
/*      CHL - Channel Define	                                        */
/*                                                                      */
/* DESCRIPTION                                                          */
/*                                                                      */
/*      This file contains data structure definitions and constants for */
/*      the channel define.        					*/
/*      		                                                */ 
/*                                                                      */
/* AUTHOR                                                               */
/*                                                                      */
/*      xianganzh    						        */
/*                                                                      */
/* DATA STRUCTURES                                                      */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/* FUNCTIONS                                                            */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/* DEPENDENCIES                                                         */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/* HISTORY                                                              */
/*                                                                      */
/*      NAME            DATE                    REMARKS                 */
/*                                                                      */
/*      zxa             06-27-2001      Created initial version 1.0     */
/*                                                                      */
/************************************************************************/
#include  	"nucleus.h" 

#ifndef 	CHL_DEFS
#define 	CHL_DEFS
#define         DEVICE_MAX_NAME	    16 
#define         CHL_MAX_NAME	    32
#define         CHANNEL_SIZE        80
/* 
A/D	1v -- 4000h/5 = 3276.8		
TA  	1a -- 0.3v/5  = 0.06v	                
*/
/************************************************************************/	                
/*
modify by gangch.  2001.8.22
保护:	A/单位 --  (100A/7.07V)*(10V/32767)/(12*1.414) = 0.000254359
保护:	V/单位 --  (120V/7.07)*(10V/32767)/(12*1.414)  = 0.000305231
接地:	A/单位 --  (2A/7.07V)*(10V/32767)/(12*1.414)   = 0.000005087
接地:	V/单位 --  (120V/7.07)*(10V/32767)/(12*1.414)  = 0.000305231
*/	
/*
测量:	A/单位 --  (20A/7.07V)*(10V/32767)  =  0.000431662085941
        V/单位 --  (120V/7.07V)*(10V/32767)  =  0.0051799450313
*/

/************************************************************************/
/************************************************************************/
/*modify by gangch.  2001.8.22*/
//modify by fei.2001.9.20
#define  	PRO_FOURIER_CURRENT	0.000254359	/*保护电流系数*/
#define  	PRO_FOURIER_VOLTAGE	0.000305231	/*保护电压系数*/
#define  	EAR_FOURIER_CURRENT	0.000050870 	/*接地3I0电流系数*/  //lht.2001.11.6
#define  	EAR_FOURIER_VOLTAGE	0.000305231	/*接地3U0电压系数*/
#define  	DDD_FOURIER_VOLTAGE	0.000305185	/*直流5V电压系数*/

#define  	MEA_FOURIER_CURRENT	0.0000254359	/*测量电流系数*/

/************************************************************************/
#define		CHL_CONSTANT_1		1       /* constant 1		*/
#define		CHL_CONSTANT_10		10      /* constant 10		*/
#define		CHL_CONSTANT_100	100     /* constant 100		*/
#define		CHL_CONSTANT_1000	1000    /* constant 1000	*/
#define  	CHL_FOURIER_VOLTAGE1	2780.0	/* 3276.8*0.05*12*1.414 */
#define  	CHL_FOURIER_VOLTAGE2	438.7	/* 3276.8*0.00789*12*1.414 */

#define		CHL_FOURIER1_	 	0	/*fourier algorthem     */
#define		CHL_MUL_		1	   /*linearity algorthem   */
#define		CHL_VECTOR_		2	/*vector algorthem   	*/
#define		CHL_FREQ_		3	/*frequency algorthem   */
#define		MODE_		        4	/*Controlword algorthem   */

#define		DC_COMPONENT		1       /*direct current        */
#define		FUNDAMENTAL		2       /*fundamental  		*/
#define		HARMONIC_2ND		4       /*2nd hormonic		*/
#define		HARMONIC_3RD		8       /*3rd hormonic 		*/
#define		HARMONIC_5TH		16      /*5th hormonic	  	*/

#define  	CHL_FOURIER_CURRENT	2687.85	/* 3276.8*0.06*12*0.8057*1.414 */

/* define the channel control block data structure.  */
typedef struct PRO_CHANNEL_STRUCT
{ 
/* 	Standard channel struct information.   Changes made
        to this area of the structure can have undesirable side effects.  */	
	UNSIGNED        chl_Num;                 	/* channel number      				*/
    	CHAR		*pchl_device_name;		/* pointer to channel device name 		*/
    	CHAR            chl_device_name[DEVICE_MAX_NAME];/* save channel device name  			*/
    	CHAR		*pchl_name;			/* pointer to channel name 			*/
    	CHAR            chl_name[CHL_MAX_NAME];  	/* save channel name  				*/
	INT		chl_calculate_style;		/* channel value calculate style 		*/	
	CHAR		*pchl_value_dimension;		/* channel value dimension 			*/
	float		chl_calculate_coefficient;	/* channel value calculate coefficient  	*/
	CHAR		chl_correlation_channel; 	/* correlation channel high 16 bits B phase  	*/
							/* 		       low 16 bits C phase   	*/
	CHAR		*pchl_Sample_Address;		/* save sample addree pointer			*/
	float		chla_DC_component;		/* save D.C component value 			*/
 	float		chla_fundamental_real;   	/* save fundamental real   			*/
 	float		chla_fundamental_imaginary;  	/* save fundamental imaginary  			*/		
	float		chla_2nd_harmonic_real;		/* save second harmonic real   			*/
	float		chla_2nd_harmonic_imaginary; 	/* save second harmonic imaginary  		*/		
	float		chla_3rd_harmonic_real;		/* save third harmonic real   			*/
	float		chla_3rd_harmonic_imaginary;  	/* save third harmonic imaginary  		*/	
	float		chla_5th_harmonic_real;		/* save fifth harmonic real  			*/
	float		chla_5th_harmonic_imaginary;  	/* save fifth harmonic imaginary  		*/	
       
        float		chlb_DC_component;		/* save D.C component value			*/
 	float		chlb_fundamental_real;   	/* save fundamental real   			*/
 	float		chlb_fundamental_imaginary;  	/* save fundamental imaginary  		*/		
	float		chlb_2nd_harmonic_real;		/* save second harmonic real   			*/
	float		chlb_2nd_harmonic_imaginary; 	/* save second harmonic imaginary  		*/		
	float		chlb_3rd_harmonic_real;		/* save third harmonic real   			*/
	float		chlb_3rd_harmonic_imaginary;  	/* save third harmonic imaginary  		*/	
	float		chlb_5th_harmonic_real;		/* save fifth harmonic real  			*/
	float		chlb_5th_harmonic_imaginary;  	/* save fifth harmonic imaginary  		*/	
	float           chl_value;
	float           chl_value1;
    	float           chl_angle;//2001.10.26
    	float           chl_scale;//2001.10.26
     	float		chl_angle_compensate;	        /* channel define reserve word1 		*/     		
     	float		chl_angle_compensate_real;	/* channel define reserve word1 		*/     		
    	float		chl_angle_compensate_imaginary;	/* channel define reserve word2 		*/     		
	UNSIGNED	chl_empty_flag;
}PRO_CHANNEL;

typedef struct CHANNEL_STRUCT
{
   	UNSIGNED      words[CHANNEL_SIZE];
}CHANNEL;

#endif



		


 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -