1. A computer system, comprising:
a graphics device interface for invoking a plurality of device driver functions for controlling the outputting of at least text data to be printed from an application program, the graphics device interface being compatible to read a double-byte code used by the application program to identify characters of the text data to be printed;
a minidriver containing a characterization of the printer, the characterization including information identifying at least one device font resident in the printer and a single-byte code used by the printer to select individual characters in the at least one device font;
a printer driver in communication with the minidriver for receiving at least the information identifying the device fonts resident in the printer and the single-byte code, the printer driver further in communication with the graphics device interface for receiving at least the text data to be printed from the application program identified by the double-byte code; and
wherein the printer driver utilizes the information from the minidriver to translate the double-byte code to the single-byte code to allow the printer driver to output translated text data to the printer corresponding to the text data to be printed, and wherein the individual characters of the translated text data are identified via the single-byte code.
2. A computer system for outputting printer commands to a printer in response to a print request from an application program, the printer including at least a first device font resident therein and selectable for printing via a single-byte code, the application program providing at least text data to be printed, characters of the text data being identified via a double-byte code, comprising:
a graphics device interface for invoking a plurality of device driver functions for controlling the outputting of at least the text data, the graphics device interface being compatible to read the double-byte code from the application program;
a minidriver containing a characterization of the printer, the characterization including information identifying the at least one device font resident in the printer and the single-byte code used to select individual characters in the device font; and
a printer driver in communication with the minidriver for receiving at least the information identifying the device fonts resident in the printer and the single-byte code, the printer driver further in communication with the graphics device interface for receiving at least the text data to be printed identified by the double-byte code, the printer driver utilizing the information from the minidriver to translate the double-byte code to the single-byte code, the printer driver outputting translated text data to the printer corresponding to the text data to be printed, and wherein the characters of the translated text data are identified via the single-byte code.
3. A method of printing glyphs using a device font stored within a printer, the device font identifying individual characters by a single-byte code, comprising the steps of:
receiving information defining the single-byte code used by the printer;
mapping the information defining the single-byte code to predefined information defining a double-byte code used by application programs to identify individual characters to be printed;
receiving at least text information to be printed, the text information utilizing the double-byte code to identify individual characters to be printed;
translating the text information to be printed from the double-byte code to the single-byte code; and
transmitting the translated text information to the printer to be printed, the translated text information utilizing the single-byte code to identify individual characters to be printed to utilize the device font stored within the printer.
4. A computer system for outputting printer commands to a printer in response to a print request from an application program, the printer including at least a first device font resident therein and selectable for printing via a first n-byte code, the application program providing at least text data to be printed, characters of the text data being identified via a second n-byte code, comprising:
a graphics device interface for invoking a plurality of device driver functions for controlling the outputting of at least the text data, the graphics device interface being compatible to read the second n-byte code;
a minidriver containing a characterization of the printer, the characterization including information identifying the at least one device font resident in the printer and the first n-byte code; and
a printer driver in communication with the minidriver for receiving at least the information identifying the device fonts resident in the printer and the first n-byte code, the printer driver further in communication with the graphics device interface for receiving at least the text data to be printed, the printer driver utilizing the information to translate the second n-byte code to the first n-byte code, the printer driver outputting translated text data to the printer corresponding to the text data to be printed, and wherein the characters of the translated text data are identified via the first n-byte code.
5. The computer system of claim 4, wherein the device font contains a first plurality of individual characters segregated into a second plurality of symbol sets, and wherein the printer driver selects both a correct symbol set and an associated n-byte code to identify a particular character within the correct symbol set during the translation of the text data to be printed from the second n-byte code, the translated text data including both a symbol set selection code and an associated n-byte code to select a particular character within the correct symbol set.
6. The computer system of claim 5, wherein the translated text data contains a plurality of symbol set selection codes and associated n-byte codes thereby selecting and printing from a plurality of symbol sets.
7. The computer system of claim 4, further comprising:
at least one predefined font file including characters which are addressed by a third n-byte code; and
wherein the printer driver downloads the predefined font file to the printer for storage therein and use as a second device font; and
wherein the printer driver selects at least one device font and an associated n-byte code to identify a particular character within the selected device font during the translation of the text data to be printed from the second n-byte code, the translated text data including both a device font selection code and an associated n-byte code to select a particular character within the selected device font.
8. The computer system of claim 7, wherein the selected device font contains a first plurality of individual characters segregated into a second plurality of symbol sets, and wherein the printer driver selects both a correct symbol set and an associated n-byte code to identify a particular character within the selected symbol set during the translation of the text data to be printed from the second n-byte code, the translated text data including a device font selection code, a symbol set selection code, and an associated n-byte code to select a particular character within the correct symbol set of a selected device font.
9. The computer system of claim 4, wherein the first n-byte code is a one byte code.
10. The computer system of claim 4, wherein the first n-byte code is a double byte code.
11. The computer system of claim 4, wherein the second n-byte code is a double byte code.
12. The computer system of claim 11, wherein the second double byte code is defined by the Unicode Standard.
13. A printer driver for controlling the printing by a printer of at least text data provided by an application program, the printer containing at least one device font stored therein having characters identified by a first n-byte code, the printer having associated therewith a minidriver containing information about the printer including information identifying the device fonts resident in the printer and the first n-byte code, comprising:
a first data structure for receiving the information identifying the device fonts resident in. the printer and the first n-byte code, the first data structure storing the first n-byte code;
a second data structure for storing a second n-byte code utilized by the application program to output text data to be printed;
a third data structure for receiving the text data to be printed from an application program, the text data utilizing the second n-byte code to identify individual characters within the text data;
a fourth data structure for mapping the second n-byte code to the first n-byte code; and
a fifth data structure for transmitting to the printer at least the text data to be printed, the transmitted text data utilizing the first n-byte code to identify individual characters within the text data.
14. The printer driver of claim 13, wherein the device font contains a first plurality of individual characters segregated into a second plurality of symbol sets, each of the second plurality of symbol sets utilizing an associated n-byte code to identify individual characters included therein, and wherein the first data structure receives and stores information identifying each of the second plurality of symbol sets and their associated n-byte codes, and wherein the fourth data structure maps the second n-byte code to a correct symbol set and associated n-byte code, the fourth data structure selecting both the correct symbol set and the associated n-byte code to identify a particular character within the correct symbol set corresponding to each character of the text data to be printed from the second n-byte code, and wherein the fifth data structure transmits translated text data including both a symbol set selection code and an associated n-byte code to select a particular character within the correct symbol set.
15. The printer driver of claim 13, further comprising a sixth data structure for storing a predefined font file including characters which are addressed by a third n-byte code; and
a seventh data structure for downloading the predefined font file to the printer for storage therein and use as a second device font; and
wherein the fourth data structure maps the second n-byte code to the third n-byte code, the fifth data structure selecting at least one device font and an associated n-byte code to transmit to the printer to identify a particular character within the selected device font in accordance with the mapping provided by the fourth data structure, the translated text data including both a device font selection code and an associated n-byte code to select a particular character within the selected device font.
16. The printer driver of claim 13, wherein the second n-byte code is a double byte code as defined by the Unicode Standard.
17. A method of printing glyphs using a device font stored within a printer, the device font identifying individual characters by a first n-byte code, comprising the steps of:
receiving information defining the first n-byte code;
mapping the information defining the first n-byte code to predefined information defining a second n-byte code used by application programs to identify individual characters to be printed;
receiving at least text information to be printed, the text information utilizing the second n-byte code to identify individual characters to be printed;
translating the text information to be printed from the second n-byte code to the first n-byte code; and
transmitting the translated text information to the printer to be printed, the translated text information utilizing the first n-byte code to identify individual characters to be printed to utilize the device font stored within the printer.
18. The method of claim 17, wherein the device font contains a first plurality of individual characters segregated into a second plurality of symbol sets, the method further comprising the steps of:
receiving information defining each of the symbol sets and their associated n-bit codes identifying individual characters stored therein;
mapping the information defining each of the symbol sets and their associated n-bit codes identifying individual characters stored therein; and
translating the text information to be printed based on the mapping to select both a correct symbol set and an associated n-byte code to identify a particular character within the correct symbol set from the second n-byte code, the translated text data including both a symbol set selection code and an associated n-byte code to select a particular character within the correct symbol set.
19. The method of claim 17, further comprising the steps of:
downloading a predefined font file to the printer for inclusion therein as a device font, the predefined font file including characters which are addressed by a third n-byte code; and
mapping information defining the predefined font file and its associated n-bit codes to the predefined second n-byte code.
The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.
1. A transformer control device based on a three-dimensional zone diagram policy, comprising: a current input, a voltage input, a channel selector, a rectifier, a single-chip microcomputer, a data memory, an interrupt processor, a data buffer, and a keyboard display chip, wherein the transformer control device further comprises a first latch and a second latch, an output terminal of the current input is connected with a first input terminal of the channel selector, an output terminal of the voltage input is connected with a second input terminal of the channel selector, an output terminal of the channel selector is connected with an input terminal of the rectifier, an output terminal of the rectifier is connected with an input terminal of the first latch, an output terminal of the first latch is connected with an input terminal of the single-chip microcomputer, an inputoutput terminal of the single-chip microcomputer is connected with an inputoutput terminal of the second latch, an output terminal of the single-chip microcomputer is connected with a first input terminal of the data memory, an first output terminal of the second latch is connected with a second input terminal of the data memory, a second output terminal of the second latch is connected with an input terminal of the data buffer, a third output terminal of the second latch is connected with an input terminal of the keyboard display chip, and a fourth output terminal of the second latch is connected with an inputoutput terminal of the interrupt processor.
2. A transformer control method based on a three-dimensional zone diagram policy, wherein the transformer control device based a the three-dimensional zone diagram policy as claimed in claim 1 is used to control a transformer A and a transformer B in a power system, and said transformer control method comprises the following steps of
Step 1: collecting three-phase voltage data and three-phase current data in the power system;
Step 2: rectifying signals of the three-phase voltage data and the three-phase current data collected in Step 1, and transferring the data to the latches in a time-transfer method; said time-transfer method comprises the following steps of: directly transferring a set of original three-phase voltage data to the latches; after one cycle, transferring collected real-time current data to the latches; after one more cycle, transferring power data to the latches; and outputting the three sets of data from the latches while the power data enter the latches;
wherein when the three-phase voltage data in the latches are not equal to the real-time voltage data after 2 cycles, compensation is needed; the voltage compensation formula is as follows:
\uf74c
u
\uf74c
t
=
\u0394
\ue89e
\ue89e
u
\u0394
\ue89e
\ue89e
t
=
u
N
–
u
0
t
N
–
t
0
(
1
)
Where \u0394u=Voltage variation in the 2 cycles; \u0394t=2 cycles; uN=Current voltage; u0=Latched voltage; tN=Current time; t0=Voltage latching time;
when the current data in the latches are not equal to real-time current data after 1 cycle, compensation is needed; the current compensation formula is as follows:
\uf74c
i
\uf74c
t
=
\u0394
\ue89e
\ue89e
i
\u0394
\ue89e
\ue89e
t
\u2032
=
i
N
–
i
0
t
N
\u2032
–
t
0
\u2032
Where \u0394i=Current variation after 1 cycle; \u0394t\u2032=1 cycle; iN=Present current; i0=Latched current; t\u2032N=Current time; t\u20320=Current latching time;
Step 3: transferring the data processed in Step 2 to an AD converter of the single-chip microcomputer to convert analog signals to digital signals, and constructing a three-dimensional zone diagram in the single-chip microcomputer;
wherein said three-dimensional zone diagram means a three-dimensional zone diagram comprising three coordinate axes of three-phase voltage U, reactive power factor COS \u03c6 and substation load S;
said three-dimensional zone diagram is named by the following rule: (a) number sequence in each layer is the same as that of traditional nine-zone diagrams; (b) serial numbers of the S axis are sequenced in an ascending order along the forward of the S axis according to critical load power; when the S axis is divided into N sections, the bottom serial number is 1, and the top serial number is N; said critical load means the load value when the operating mode of a transformer changes;
In the three-dimensional zone diagram, each zone number includes double digits, wherein the first digit represents the layer of the S axis, and the second digit represents the position of the zone in the layer; therefore, 9 zones in the bottom layer are numbered from 11 to 19, 9 zones in the middle layer are numbered from 21 to 29, and 9 zones in the top layer are numbered from 31 to 39;
said method for constructing a three-dimensional zone diagram comprises the following steps of:
Step 3-1: constructing a three-dimensional coordinate system with the three-phase voltage, the reactive power factor and the substation load;
Step 3-2: determining critical load power limits in the method that critical load is determined according to parameters on the nameplate of a transformer, i.e. the critical load can be determined as long as the type of the transformer in a target substation is known;
Step 3-3: determining three-phase voltage limits in the following two methods:
(1) the upper voltage limit is set as the maximum acceptable positive offset or a value 2% less than the maximum offset, and the lower voltage limit is set as the maximum acceptable negative offset or a value 2% greater than the maximum negative offset; and
(2) a time period is divided into several sub-periods, and voltage limits are set respectively based on the sub-periods; said time period can be 1 day, 1 week or 1 month;
the three-phase voltage limits determined in method (1) and method (2) are corrected in a contrary voltage control method; the contrary voltage control method is performed by increasing the center point voltage at the peak load and reducing the center point voltage at the trough load; compensation effects of contrary voltage control are optimized by making the voltage operate towards the upper limit at peak load and increasing the lower voltage limit, or making the voltage operate towards the lower limit at trough load and reducing the upper voltage limit;
Step 3-4: determining reactive power factor limits in the following two methods:
(1) reactive power factor limits are set as constant values in the following method:
the reactive power factor limits are set based on requirements of the substation for the power factor according to one of the following rules:
Rule 1: The upper power limit is set as 1, and the lower power limit is set as 0.9;
Rule 2: The lower limit of the reactive power is set as 0, and the upper limit of the reactive power is set as 1.3 times higher than reactive power of a single capacitor;
(2) reactive power limits are set with curves by dividing a time period into several sub-periods, and reactive power factor limits are set respectively based on the sub-periods; the time period can be 1 day, 1 week or 1 month;
Method (1) and method (2) above are corrected in the same contrary voltage control method as Step 3-3;
Step 4: determining transformer operating conditions according to points of the voltage, the reactive power factor and the substation load in the three-dimensional zone diagram, and adjusting the transformer in the three-dimensional zone diagram method and the three-dimensional zone diagram projection method, wherein the three-dimensional zone diagram method comprises the following steps of setting SLA\u02dcB as the low critical load, and setting SLB\u02dcAB as the high critical load;
if said points are in Zone 11, then the voltage is out of the lower voltage limit, the power factor is out of the upper limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that transformer taps are raised first, the capacitors are switched off, and meanwhile, transformer A operates independently;
if said points are in Zone 12, then the voltage is acceptable, the power factor is out of the upper limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that the capacitors are switched off, and meanwhile, transformer A operates independently;
if said points are in Zone 13, then the voltage is out of the upper voltage limit, the power factor is out of the upper limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that the capacitors are switched off, transformer taps are lowered, and meanwhile, transformer A operates independently;
if said points are in Zone 14, then the voltage is out of the upper voltage limit, the power factor is acceptable, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that transformer taps are lowered, and meanwhile, transformer A operates independently;
if said points are in Zone 15, then the voltage is out of the upper voltage limit, the power factor is out of the lower limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that transformer taps are lowered, the capacitors are switched on, and meanwhile, transformer A operates independently;
if said points are in Zone 16, then the voltage is acceptable, the power factor is out of the lower limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that the capacitors are switched on, and meanwhile, transformer A operates independently;
if said points are in Zone 17, then the voltage is out of the lower voltage limit, the power factor is out of the lower limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that capacitors are switched on, transformer taps are raised, and meanwhile, transformer A operates independently;
if said points are in Zone 18, then the voltage is out of the lower voltage limit, the power factor is acceptable, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that transformer taps are raised, and meanwhile, transformer A operates independently;
if said points are in Zone 19, then the voltage is acceptable, the power factor is acceptable, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that transformer taps are kept in the original position, the capacitors remain in the same condition, and meanwhile, transformer A operates independently;
if said points are in Zone 21, then the voltage is out of the lower voltage limit, the power factor is out of the upper limit, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are raised first, the capacitors are disconnected, and meanwhile, transformer B operates independently;
if said points are in Zone 22, then the voltage is acceptable, the power factor is out of the upper limit, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched off, and meanwhile, transformer B operates independently;
if said points are in Zone 23, then the voltage is out of the upper voltage limit, the power factor is out of the upper limit, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched off first, transformer taps are lowered, and meanwhile, transformer B operates independently;
if said points are in Zone 24, then the voltage is out of the upper voltage limit, the power factor is acceptable, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are lowered, and meanwhile, transformer B operates independently;
if said points are in Zone 25, then the voltage is out of the upper voltage limit, the power factor is out of the lower limit, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are lowered first, the capacitors are switched on, and meanwhile, transformer B operates independently;
if said points are in Zone 26, then the voltage is acceptable, the power factor is out of the lower limit, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched on, and meanwhile, transformer B operates independently;
if said points are in Zone 27, then the voltage is out of the lower voltage limit, the power factor is out of the lower limit, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that capacitors are switched on, transformer taps are raised, and meanwhile, transformer B operates independently;
if said points are in Zone 28, then the voltage is out of the lower voltage limit, the power factor is acceptable, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are raised, and meanwhile, transformer B operates independently;
if said points are in Zone 29, then the voltage is acceptable, the power factor is acceptable, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are kept in the original position, the capacitors remain in the same condition, and meanwhile, transformer B operates independently;
if said points are in Zone 31, then the voltage is out of the lower voltage limit, the power factor is out of the upper limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are raised first, the capacitors are switched off, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 32, then the voltage is acceptable, the power factor is out of the upper limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched off, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 33, then the voltage is out of the upper voltage limit, the power factor is out of the upper limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched off, transformer taps are lowered, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 34, then the voltage is out of the upper voltage limit, the power factor is acceptable, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are lowered, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 35, then the voltage is out of the upper voltage limit, the power factor is out of the lower limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are lowered first, the capacitors are switched on, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 36, then the voltage is acceptable, the power factor is out of the lower limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched on, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 37, then the voltage is out of the lower voltage limit, the power factor is out of the lower limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that capacitors are switched on, transformer taps are raised, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 38, then the voltage is out of the lower voltage limit, the power factor is acceptable, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are raised, and meanwhile, transformers A and B operate in parallel;
if said points are in Zone 38, then the voltage is acceptable, the power factor is acceptable, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that transformer taps are kept in the original position, the capacitors remain in the same condition, and meanwhile, transformers A and B operate in parallel;
wherein said three-dimensional zone diagram projection method is as follows:
after one parameter of the voltage, the reactive power factor and the substation load is omitted in the three-dimensional zone diagram constructed in Step 3, plane projections of the other two parameters can be obtained:
when the S-cos \u03c6 plane is projected, UL represents low critical voltage, and UH represents high critical voltage; when the voltage is between UL and UH, downward vertical projection is performed at 90 degrees, and a projection in the shape of a two-dimension nine-zone diagram is obtained; when the voltage U is not between UL and UH the projection angle \u03b1 changes with U, and projection is performed at \u03b1; said projection angle \u03b1 is calculated with the following formula:
tan
\ue89e
\ue89e
\u03b1
=
U
–
(
U
H
–
U
L
)
U
the two-dimensional zone diagram formed by projection is named by the following rule: Projection zones formed by downward vertical projection are represented by three digits separated by slashes, and the three digits are respectively code names of 3 sub-spaces along the ordinate of the three-dimensional zone diagram;
operating conditions of the transformers are determined according to the positions of points formed by the voltage and the reactive power factor in the two-dimensional zone diagram, and the transformers are adjusted by the following method:
if said points are in Zone 151617, then the power factor is out of the lower limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that the capacitors are switched on, and transformer A operates independently;
if said points are in Zone 141819, then the power factor is acceptable, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that the existing capacitors remain in the same condition, and transformer A operates independently;
if said points are in Zone 111213, then the power factor is out of the upper limit, and the load power is lower than SLA\u02dcB; the transformers should be adjusted by the method that the capacitors are switched off, and transformer A operates independently;
if said points are in Zone 252627, then the power factor is out of the lower limit, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched on, and transformer B operates independently;
if said points are in Zone 242829, then the power factor is acceptable, and the load power is between SLA\u02dcB and SLB\u02dcAB; the transformers should be adjusted by the method that the existing capacitors remain in the same condition, and transformer B operates independently;
if said points are in Zone 353637, then the power factor is out of the lower limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched on, and transformers A and B operate independently;
if said points are in Zone 343839, then the power factor is acceptable, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that the existing capacitors remain in the same condition, and transformers A and B operate independently; and
if said points are in Zone 313233, then the power factor is out of the upper limit, and the load power is higher than SLB\u02dcAB; the transformers should be adjusted by the method that the capacitors are switched off, and transformers A and B operate independently.