CN110568808A - Ammeter relay control method - Google Patents

Ammeter relay control method Download PDF

Info

Publication number
CN110568808A
CN110568808A CN201910862832.7A CN201910862832A CN110568808A CN 110568808 A CN110568808 A CN 110568808A CN 201910862832 A CN201910862832 A CN 201910862832A CN 110568808 A CN110568808 A CN 110568808A
Authority
CN
China
Prior art keywords
state
relay
register
logic
expression
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.)
Granted
Application number
CN201910862832.7A
Other languages
Chinese (zh)
Other versions
CN110568808B (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.)
Yantai Dongfang Wisdom Electric Co Ltd
Original Assignee
Yantai Dongfang Wisdom Electric Co Ltd
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 Yantai Dongfang Wisdom Electric Co Ltd filed Critical Yantai Dongfang Wisdom Electric Co Ltd
Priority to CN201910862832.7A priority Critical patent/CN110568808B/en
Publication of CN110568808A publication Critical patent/CN110568808A/en
Application granted granted Critical
Publication of CN110568808B publication Critical patent/CN110568808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/045Programme control other than numerical control, i.e. in sequence controllers or logic controllers using logic state machines, consisting only of a memory or a programmable logic device containing the logic for the controlled machine and in which the state of its outputs is dependent on the state of its inputs or part of its own output states, e.g. binary decision controllers, finite state controllers
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F15/00Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity
    • G07F15/003Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity for electricity

Abstract

The invention discloses an ammeter relay control method, which comprises the following steps: (A) summarizing input variables related to relay actions, all possible states of the relay and additional actions required to be executed when the relay is switched among the states; (B) setting a logic script, wherein state conversion expressions recorded in the logic script are used for expressing the conversion conditions of the relay from one state to another state, and each state conversion expression also corresponds to an additional action; (C) and performing state conversion according to the input variable and the logic script. The invention provides a relay control scheme with clear hierarchy, and only a plurality of lines of scripts need to be modified each time the control logic changes, so that the maintenance cost and the test cost are reduced.

Description

Ammeter relay control method
Technical Field
the invention relates to a method of controlling a relay.
background
The relay is a very critical device in the smart meter and plays an important role in load control. For example, the load is disconnected through the relay when the balance of the user account is used up, and when a power grid fault (such as overvoltage) is detected, the relay is tripped in time to protect the electric equipment of the user, and the like.
with the increasing complexity of electric equipment, users also put forward more complex requirements on the control logic of the relay, for example, after a power out-of-limit event occurs, the electric meter is tripped immediately, and then automatic closing is tried at intervals; after the master station issues a switching-on command, the ammeter cannot be switched on immediately and needs to be switched on after the user key is confirmed; and the master station issues a tripping command, and if the electric meter is in an overcurrent state, the master station waits for the overcurrent state to disappear and then trips.
different users have different requirements on the control logic of the relay, and the code and the control logic of the relay need to be changed whenever the requirements of the users are changed. Due to the complexity of the relay control logic, the code modification amount is very large, and high maintenance cost and test cost are brought.
disclosure of Invention
The invention provides an ammeter relay control method, which aims to: and the code modification amount when the relay control logic is changed is reduced, and the maintenance cost and the test cost are reduced.
the technical scheme of the invention is as follows:
an ammeter relay control method comprises the following steps:
(A) Summarizing input variables related to relay actions, all possible states of the relay and additional actions required to be executed when the relay is switched among the states;
(B) setting a logic script, wherein a plurality of state conversion expressions formed by input variables and logic operators are recorded in the logic script, the state conversion expressions are used for expressing conversion conditions of the relay for converting from one state to another state, and each state conversion expression also corresponds to an additional action;
(C) And performing state conversion according to the input variables and the logic script: and selecting the state conversion expressions related to the current state according to the current state, respectively carrying out logic judgment, and if the judgment result of a certain state conversion expression is 'true', executing the additional action corresponding to the state conversion expression and converting to a new state.
as a further improvement of the method: the states comprise a closing state after the relay is closed, an opening state after tripping, and an intermediate state which is passed by the relay when the relay is switched between the closing state and the opening state;
The criteria for setting the intermediate state are: when the relay is switched from a certain initial state to a certain target state, if the conditions to be met have a sequential logic relationship, the switching process is divided into a plurality of stages according to the sequential logic relationship, and an intermediate state is set between adjacent stages.
As a further improvement of the method: the state transition expression is a suffix expression.
As a further improvement of the method: the specific steps of performing logic judgment on the suffix expression are as follows:
(C-1) applying for a cache region, and placing a suffix expression into the cache region; the application register 1 and the register 2 are used for temporarily storing intermediate operation results; the application Counter is recorded as Counter and used for storing the register number of the latest operation;
(C-2) scanning the suffix expressions in order from left to right, one character at a time, until the end of the character string; during scanning:
(C-2-1) if the scanned character is an input variable, storing the input variable value in the register, if the register 1 is empty, storing in the register 1, and setting Counter to 1, otherwise, storing in the register 2, and setting Counter to 2;
(C-2-2) if the scanned character is a monocular operator, positioning a register of the latest operation according to the value of the Counter, performing a logical operation in combination with the monocular operator, and storing the operation result in the register;
(C-2-3) if the scanned character is a binocular operator, taking out values of the register 1 and the register 2, performing logical operation in combination with the binocular operator, storing an operation result in the register 1, resetting the register 2, and setting Counter to 1;
and (C-3) after the scanning is finished, taking out the value of the register 1 as a final logic operation result.
compared with the prior art, the invention has the following positive effects: (1) the method divides the control into an input layer, a logic script layer and an output layer by summarizing input variables, constructing logic scripts and defining the output state, provides a relay control scheme with clear layers, only needs to modify a plurality of rows of scripts when the control logic changes every time, and reduces the maintenance cost and the test cost; (2) the method also sets an intermediate state according to the precedence logic relationship among the conversion conditions, divides the related conditions into different state conversion expressions, solves the problem that the precedence logic relationship cannot be embodied in one state conversion expression, simplifies the state conversion expressions, makes the logic relationship among the states clearer and is beneficial to rapid maintenance; (3) the method uses the suffix expression to record the state conversion expression, the mode is more matched with the stack structure in the relay control module, the existing software and hardware resources can be fully utilized, the operation speed is improved, and the adaptation cost is reduced.
drawings
fig. 1 is a schematic diagram of state transition in the embodiment, and the right side in the diagram is additional actions and state transition expressions corresponding to the transition between states.
FIG. 2 is a schematic flow chart of the method.
Detailed Description
The technical scheme of the invention is explained in detail in the following with the accompanying drawings:
in this embodiment, a typical control logic of a relay is taken as an example, and specific control requirements of the relay are as follows:
1. when detecting that the account balance is 0, the relay trips immediately;
2. after the account is recharged, the balance is larger than 0, the meter cover is not opened, the relay is switched on immediately, otherwise, the action is not carried out;
3. When the meter cover is detected to be opened, the relay trips immediately;
4. After the meter opening cover is finished, namely after the meter closing cover is closed, the relay does not act;
5. When a tripping command is received, tripping is carried out immediately;
6. after a closing command is received, if the meter cover is not opened and the account balance is greater than 0, and the user performs key confirmation, closing is performed, otherwise, the user does not act.
The following describes a specific control method of the present embodiment with reference to fig. 2:
(A) Firstly, input variables related to relay actions, all possible states of the relay and additional actions required to be executed when the relay is switched among the states are collected, and the control of the relay is divided into an input layer, a logic script layer and an output layer.
(A-1) the input layer in this embodiment relates to input variables such as:
a: the account balance is greater than 0;
b: opening the meter cover;
c: receiving a tripping command;
D: receiving a closing command;
e: a key press occurs;
A. b, C, D, E are identifiers of the input variables. These variables are all boolean type variables that represent trigger conditions related to relay action.
and (A-2) the output layer defines possible output states and additional actions of the relay, wherein the possible output states comprise an opening state (corresponding additional action: tripping) and a closing state (corresponding additional action: closing) after tripping.
meanwhile, the control requirement 6 specifies: after a closing command is received, if the meter cover is not opened and the account balance is greater than 0, and the user performs key confirmation, closing is performed, otherwise, the user does not act. Here, the step of executing the closing action may be actually divided into two stages having a sequential logic relationship: the first stage judges whether a closing command is received or not, the second stage is executed after the first stage judges that the command is true, whether other conditions are met or not is judged, and closing or tripping is determined. In order to solve the problem that the sequential logic relationship cannot be embodied in the expression, an intermediate state, namely a state to be switched on (corresponding additional action: no specific action is executed, and only occupation is used) is set between the two stages. Therefore, the switching from switching on to switching off specified in the control requirement 6 is switched to two steps of switching from switching on to be switched on and switching to switching on again, so that the subsequent state conversion expression is simplified, and the logic relation between the states is clearer.
In summary, as in FIG. 1, the output layer defines three states and additional actions:
state 1: open state, additional actions to be taken in transitioning from state 2 or 3 to state 1: tripping, the identifier of the additional action is M;
state 2: and (3) when the state to be switched on is converted from the state 1 to the state 2, the additional action required to be taken is as follows: the method comprises the following steps of not executing specific actions, occupying the space, wherein the identifier of the additional action is N; in this example, there is no transition from state 3 to state 2;
State 3: closing state, additional actions to be taken when transitioning from state 1 or 2 to state 3: and closing, wherein the identifier of the additional action is O.
and establishing a temporary storage area and recording the current state.
(B) setting a logic script, wherein a plurality of state conversion expressions formed by input variables and logic operators are recorded in the logic script, the state conversion expressions are used for expressing conversion conditions of the relay for converting from one state to another state, and each state conversion expression also corresponds to an additional action.
The logical operators involved in the state transition expression are: definitions "X" symbol represents a "logical AND" operation, "a" + "symbol represents a" logical OR "operation, and a"! The "symbol indicates a" logical not "operation, the" ↓ "symbol indicates a rising edge trigger condition judgment, that is, a change of the input variable value from 0 to 1, and the" ↓ "symbol indicates a falling edge trigger condition judgment, that is, a change of the input variable value from 1 to 0. The state transition expression is associated with the corresponding additional action using "═ i". For example, the following steps are carried out:
O=A+B×!C+↑D
In the above formula, if the variable a is true, or the condition D is triggered by a rising edge, or the condition B is true and C is false, the result is true on the right side, otherwise the result is false. If the equal sign right output is true, then additional action O to the left of the condition is performed.
specifically, the method comprises the following steps:
(B-1) establishing a state transition expression for each transition condition in accordance with the control requirement (essentially the transition condition). The transition of the state is represented by the symbol "→", and if the transition condition is null (i.e., there is no such transition), the logic script is filled with Φ, and simultaneously, the states 1, 2, and 3 are represented by 1, 2, and 3, respectively, and the logic script of the present embodiment can be represented as:
1→2 N=↑D
1→3 O=↑A×!B
2→1 M=↑C
2→3 O=↑E×A×!B
3→1 M=↓A+↑B+↑C
3→2 Φ。
(B-2) converting the state conversion expression on the right side from the infix expression to the suffix expression according to the following rule:
[. The ] represents a logic judgment unit in the state conversion expression;
If [ g ] is a constant, then the suffix expression of [ g ] is itself;
If [. C]is in the shape of A1opA2the expression of (op) is a two-mesh operator, then its suffix expression is A'1A′2op, wherein A'1,A′2Is A1,A2Suffix expression of (1);
If [. C]is in the shape ofopA1The expression of (op) is a monocular operator, then its suffix expression is A'1op, wherein A'1is A1Suffix expression of (1);
If [ a ] is an expression like (a) enclosed by brackets, its suffix is expressed in the same way as the suffix of a itself;
According to the conversion rule, the logic script is converted into:
1→2 N=D↑
1→3 O=A↑B!×
2→1 M=C↑
2→3 O=E↑A×B!×
3→1 M=A↓B↑+C↑+
3→2 Φ。
(C) And performing state conversion according to the input variables and the logic script: and selecting the state conversion expressions related to the current state according to the current state, respectively carrying out logic judgment, and if the judgment result of a certain state conversion expression is 'true', executing the additional action corresponding to the state conversion expression and converting to a new state.
the method comprises the following steps:
firstly, a temporary storage area obtains a current output state, and then, according to the current output state, a logic script is traversed to obtain a state conversion expression related to the current output state. If the current state is 1, the state transition expression related to the current output state is as follows:
1→2N=D↑
1→3O=A↑B!×。
then:
(C-1) applying for a cache region, and placing a suffix expression into the cache region; the application register 1 and the register 2 are used for temporarily storing intermediate operation results; the application Counter is recorded as Counter and used for storing the register number of the latest operation;
(C-2) scanning the suffix expressions in order from left to right, one character at a time, until the end of the character string; during scanning:
(C-2-1) if the scanned character is an input variable, storing the input variable value in the register, if the register 1 is empty, storing in the register 1, and setting Counter to 1, otherwise, storing in the register 2, and setting Counter to 2;
(C-2-2) if the scanned character is a monocular operator, positioning a register of the latest operation according to the value of the Counter, performing a logical operation in combination with the monocular operator, and storing the operation result in the register;
(C-2-3) if the scanned character is a binocular operator, taking out values of the register 1 and the register 2, performing logical operation in combination with the binocular operator, storing an operation result in the register 1, resetting the register 2, and setting Counter to 1;
And (C-3) after the scanning is finished, taking out the value of the register 1 as a final logic operation result.

Claims (4)

1. an ammeter relay control method is characterized by comprising the following steps:
(A) summarizing input variables related to relay actions, all possible states of the relay and additional actions required to be executed when the relay is switched among the states;
(B) setting a logic script, wherein a plurality of state conversion expressions formed by input variables and logic operators are recorded in the logic script, the state conversion expressions are used for expressing conversion conditions of the relay for converting from one state to another state, and each state conversion expression also corresponds to an additional action;
(C) And performing state conversion according to the input variables and the logic script: and selecting the state conversion expressions related to the current state according to the current state, respectively carrying out logic judgment, and if the judgment result of a certain state conversion expression is 'true', executing the additional action corresponding to the state conversion expression and converting to a new state.
2. An electricity meter relay control method as in claim 1, wherein: the states comprise a closing state after the relay is closed, an opening state after tripping, and an intermediate state which is passed by the relay when the relay is switched between the closing state and the opening state;
The criteria for setting the intermediate state are: when the relay is switched from a certain initial state to a certain target state, if the conditions to be met have a sequential logic relationship, the switching process is divided into a plurality of stages according to the sequential logic relationship, and an intermediate state is set between adjacent stages.
3. An electricity meter relay control method as in claim 1, wherein: the state transition expression is a suffix expression.
4. An electricity meter relay control method as claimed in claim 3, characterized in that: the specific steps of performing logic judgment on the suffix expression are as follows:
(C-1) applying for a cache region, and placing a suffix expression into the cache region; the application register 1 and the register 2 are used for temporarily storing intermediate operation results; the application Counter is recorded as Counter and used for storing the register number of the latest operation;
(C-2) scanning the suffix expressions in order from left to right, one character at a time, until the end of the character string; during scanning:
(C-2-1) if the scanned character is an input variable, storing the input variable value in the register, if the register 1 is empty, storing in the register 1, setting Counter =1, otherwise, storing in the register 2, setting Counter = 2;
(C-2-2) if the scanned character is a monocular operator, positioning a register of the latest operation according to the value of the Counter, performing a logical operation in combination with the monocular operator, and storing the operation result in the register;
(C-2-3) if the scanned character is a binocular operator, taking out values of the register 1 and the register 2, performing logical operation in combination with the binocular operator, storing an operation result in the register 1, clearing the register 2, and setting Counter = 1;
and (C-3) after the scanning is finished, taking out the value of the register 1 as a final logic operation result.
CN201910862832.7A 2019-09-12 2019-09-12 Ammeter relay control method Active CN110568808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910862832.7A CN110568808B (en) 2019-09-12 2019-09-12 Ammeter relay control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910862832.7A CN110568808B (en) 2019-09-12 2019-09-12 Ammeter relay control method

Publications (2)

Publication Number Publication Date
CN110568808A true CN110568808A (en) 2019-12-13
CN110568808B CN110568808B (en) 2020-10-02

Family

ID=68779730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910862832.7A Active CN110568808B (en) 2019-09-12 2019-09-12 Ammeter relay control method

Country Status (1)

Country Link
CN (1) CN110568808B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000048281A2 (en) * 1999-02-12 2000-08-17 General Electric Company Distributed logic in multiple protective relays
KR20020090941A (en) * 2002-09-24 2002-12-05 강용석 Automatic urine syringe
CN1588254A (en) * 2004-07-17 2005-03-02 周建龙 New producing method for programmable observing and cotnrol equipment
CN102122242A (en) * 2011-03-03 2011-07-13 广州东芝白云电器设备有限公司 Relay protection logical equation analyzing method
CN102609269A (en) * 2012-02-17 2012-07-25 南京南瑞继保电气有限公司 Visual implementation method for sequential function chart

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000048281A2 (en) * 1999-02-12 2000-08-17 General Electric Company Distributed logic in multiple protective relays
KR20020090941A (en) * 2002-09-24 2002-12-05 강용석 Automatic urine syringe
CN1588254A (en) * 2004-07-17 2005-03-02 周建龙 New producing method for programmable observing and cotnrol equipment
CN102122242A (en) * 2011-03-03 2011-07-13 广州东芝白云电器设备有限公司 Relay protection logical equation analyzing method
CN102609269A (en) * 2012-02-17 2012-07-25 南京南瑞继保电气有限公司 Visual implementation method for sequential function chart

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李孝: "继电保护通用逻辑开发平台设计", 《中国优秀硕士学位论文全文数据库(电子期刊)工程科技Ⅱ辑》 *
许文靓: "基于LMI的PLC功能块图和顺序功能图的相互转换技术", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》 *

Also Published As

Publication number Publication date
CN110568808B (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN111952972A (en) Main distribution integrated load transfer method for high-quality power supply service
Ouedraogo et al. Nonblocking and safe control of discrete-event systems modeled as extended finite automata
US20120239170A1 (en) Method and system for engineering a substation automation system
EP2933891B1 (en) Load restoration in a high or medium voltage substation
WO2010080490A1 (en) Feeder automation for an electric power distribution system
CN101431254A (en) Intelligent apparatus GOOSE virtual terminal collocation method for digitized transforming plant
Yang et al. Coordinated optimization for controlling short circuit current and multi-infeed DC interaction
CN104166944A (en) Switching operation bill generation method of railway transformation and distribution substation
CN110568808B (en) Ammeter relay control method
CN106971923A (en) A kind of breaker controlled by information
CN111211538B (en) Method for realizing protection constant value setting through power distribution network line diagram
CN107292437B (en) Fault current limiter distribution optimization and capacity selection method and system
Pala et al. An adaptive, agent-based protection scheme for radial distribution networks based on IEC 61850 and IEC 61499
WO2023202018A1 (en) Multi-mode power distribution terminal protection control apparatus and method based on analog-to-digital array
CN102201180A (en) Process bus relay protection teaching experiment method based on PC (personal computer) platform
EP2891018B1 (en) Intelligent electronic device suitable for use in substation automation system and a method of operating the same
CN106329714A (en) Method for dynamically judging switch type of power grid
CN107623328B (en) Method for reducing closed loop current of power distribution network
Kashtanov et al. Application of graph theory as a tool for reconfiguration of the distribution network
Haijun et al. Simulation and real time analysis of network protection tripping strategy based on behavior trees
Benabid A new formulation and solving of protective relays setting and coordination problem using multi-objective optimization and fuzzy logic
Apostolov et al. Simplifying the configuration of multifunctional protection relays
CN102739127A (en) Solid-state soft-starting device and method of multiple high-voltage motors
CN100468907C (en) High speed transfer system
CN115657540A (en) Comprehensive energy equipment control method and device, terminal equipment and storage medium

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