A universal programmable piecewise linear function analog circuit
By designing a general-purpose programmable piecewise linear function analog circuit that includes a decision module, a selection module, and an addition module, the problems of inflexible circuit design and poor scalability in the prior art are solved. It achieves fast response and precise control, reduces hardware implementation costs, and is applicable to a variety of chaotic systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-26
Smart Images

Figure CN121903013B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic information engineering technology, and in particular to a general-purpose programmable piecewise linear function analog circuit. Background Technology
[0002] Piecewise linear functions (PWLs) are widely used to construct complex chaotic systems due to their simplicity, ease of analysis, and strong hardware feasibility. Currently, there are two main approaches to implementing PWLs: digital and analog. Digital approaches are typically based on FPGAs or microcontrollers, outputting function values through table lookups or real-time calculations. While flexible, these approaches are limited by sampling rate and processing latency. For complex chaotic systems, digital implementations are slow. Analog circuit approaches, on the other hand, offer advantages such as high bandwidth and low latency. Regarding the implementation of multi-vortex attractors in analog circuits, existing solutions include: Patent [Authorization Announcement No. CN119316117A] proposes implementing multi-directional dual-vortex chaotic attractors using memristor neural network circuits. However, this method involves complex formulas, and the resistance parameters in the circuit design cannot be precisely controlled (resistance values are not integers or common values). The circuit design lacks flexibility and scalability, making this method of generating multi-vortex attractors often only effective for certain specific systems, and preventing users from easily and quickly configuring circuit parameters to adapt to various chaotic systems. Therefore, there is an urgent need in this field for a general-purpose, online-programmable, and easily expandable analog piecewise linear function circuit module. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a general-purpose programmable piecewise linear function analog circuit that can independently and accurately configure all piecewise parameters through an external standard voltage signal. It can be used as a plug-and-play standardized nonlinear unit and flexibly adapted to a variety of different chaotic system hardware platforms, thereby significantly reducing the difficulty and cost of hardware implementation of complex nonlinear systems.
[0004] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0005] This invention provides a general-purpose programmable piecewise linear function analog circuit, including a decision module, a selection module, and an addition module;
[0006] The decision module includes multiple decision branches, each of which includes a comparator and a threshold voltage. The non-inverting input of the comparator is connected to the original input signal, and the inverting input is grounded through the threshold voltage. The threshold voltage is used to determine the segmentation point of the piecewise linear function.
[0007] The selection module includes a controllable bias voltage and an analog switch equal in number to the decision branch. The control terminals of the analog switches are connected one-to-one to the output terminals of the comparator, and the input terminals of all the analog switches are grounded through the controllable bias voltage.
[0008] The addition module includes an inverting adder and an input resistor. The input terminal of the inverting adder is connected to the output terminals of all the analog switches, and is also connected to the original input signal through the input resistor. The output terminal of the inverting adder serves as the circuit output. The input resistor and the feedback resistor of the inverting adder are used to determine the slope of the piecewise linear function.
[0009] Optionally, the piecewise linear function for:
[0010]
[0011] In the formula, These are the input resistance and the feedback resistance, respectively. The original input signal, It is a controllable bias voltage. These are the threshold voltages for each decision branch. To determine the number of branches, a piecewise linear function is used. The number of segments is .
[0012] Optionally, each of the decision branches further includes voltage follower U1 and voltage follower U3;
[0013] The input terminal of the voltage follower U1 is connected to the original input signal, and the output terminal is connected to the non-inverting input terminal of the comparator.
[0014] The input terminal of the voltage follower U3 is connected to the output terminal of the comparator via a voltage divider resistor, and the output terminal is connected to the control terminal of the corresponding analog switch.
[0015] The output of the comparator is also connected to the power supply VCC through a pull-up resistor and grounded through a filter capacitor. The pull-up resistor, the voltage divider resistor, and the pull-down resistor of the voltage follower U3 constitute a voltage divider circuit to reduce the input and output voltage of the voltage follower U3.
[0016] Optionally, the selection module further includes a number of voltage followers equal to the number of analog switches, with each voltage follower connected one-to-one between the output of the analog switch and the input of the inverting adder.
[0017] Optionally, all the analog switches in the selection module can be integrated into a single switch integrated chip.
[0018] Optionally, the adder module further includes an inverting amplifier with a gain of one, the input of which is connected to the output of the inverting adder.
[0019] Optionally, the adder module further includes voltage follower U11 and voltage follower U13. The input terminal of voltage follower U11 is connected to the output terminal of the inverting adder, and the output terminal is connected to the input terminal of the inverting amplifier. The input terminal of voltage follower U13 is connected to the output terminal of the inverting amplifier.
[0020] Optionally, the comparator uses a TLV3501 chip.
[0021] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0022] This invention provides a general-purpose programmable piecewise linear function analog circuit. The circuit's input, control, and output terminals are clearly decoupled, which facilitates its portability as a general-purpose module. By adjusting external voltage parameters, the chaotic attractor structure can be intuitively controlled, greatly simplifying the experimental process for complex dynamic systems and significantly reducing costs compared to digital implementation methods. Attached Figure Description
[0023] Figure 1 This is a topology diagram of a general programmable piecewise linear function analog circuit provided in an embodiment of the present invention;
[0024] Figure 2 This is a simulation diagram of the piecewise linear function provided in an embodiment of the present invention;
[0025] Figure 3 This is a measured graph of the piecewise linear function provided in an embodiment of the present invention. Detailed Implementation
[0026] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0027] Example 1
[0028] like Figure 1As shown, this embodiment of the invention provides a general-purpose programmable piecewise linear function analog circuit, including a decision module, a selection module, and an adder module. The decision module includes multiple decision branches, each including a comparator and a threshold voltage. The non-inverting input of the comparator is connected to the original input signal, and the inverting input is grounded through the threshold voltage. The threshold voltage is used to determine the segmentation point of the piecewise linear function. The selection module includes a controllable bias voltage and an analog switch equal in number to the decision branches. The control terminals of the analog switches are connected one-to-one to the output terminals of the comparator, and the input terminals of all analog switches are grounded through the controllable bias voltage. The adder module includes an inverting adder and an input resistor. The input terminal of the inverting adder is connected to the output terminals of all analog switches and is also connected to the original input signal through the input resistor. The output terminal of the inverting adder serves as the circuit output, and the input resistor and the feedback resistor of the inverting adder are used to determine the slope of the piecewise linear function.
[0029] Take a piecewise linear function with three segments of slope k and bias parameter d as an example:
[0030]
[0031] (1) The decision module includes two decision branches, each of which includes a comparator and a threshold voltage, denoted as comparator U2, comparator U8, and threshold voltage. Threshold voltage The non-inverting inputs of comparators U2 and U8 are connected to the original input signal x, and the inverting inputs are connected to a threshold voltage. and Grounding; threshold voltage is used to determine the breakpoint of the piecewise linear function; that is: , , .
[0032] In this embodiment, the comparator is a high-speed, low-hysteresis TLV3501 voltage comparator (fall time of 4.5ns). Using this high-speed comparator can make the piecewise linear function module approach the ideal operating state.
[0033] To ensure isolation and buffering during signal transmission, each decision branch is equipped with two voltage followers. The voltage followers of the first decision branch are denoted as U1 and U3. The non-inverting input terminals of voltage followers U1 and U3 are grounded through pull-down resistors R1 and R7, respectively. (The resistance values of pull-down resistors R1 and R7 are relatively large because after the op-amp is powered on, if there is no signal input and the pin is floating, the pin will automatically become a large negative voltage. This negative voltage may damage the circuit structure, so a large resistance value is added to prevent the pin from floating.) The input terminal of voltage follower U1 is connected to the original input signal x, and the output terminal is connected to the non-inverting input terminal of comparator U2. The input terminal of voltage follower U3 is connected to the output terminal of comparator U2 via voltage divider resistor R5, and the output terminal is connected to the control terminal of the corresponding analog switch. The output terminal of comparator U2 is also connected to the power supply VCC via pull-up resistor R3 and grounded via filter capacitor C1. Pull-up resistor R3, voltage divider resistor R5 and pull-down resistor R7 of voltage follower U3 form a voltage divider circuit to reduce the input and output voltage of voltage follower U3.
[0034] The voltage followers in the second decision branch are denoted as U7 and U9. The non-inverting inputs of voltage followers U7 and U9 are grounded via pull-down resistors R2 and R8, respectively. The input of voltage follower U7 is externally connected to the original input signal x, and its output is connected to the non-inverting input of comparator U8. The input of voltage follower U9 is connected to the output of comparator U8 via a voltage divider resistor R6, and its output is connected to the control terminal of the corresponding analog switch. The output of comparator U8 is also connected to the power supply VCC via a pull-up resistor R4 and grounded via a filter capacitor C2. The pull-up resistor R4, the voltage divider resistor R6, and the pull-down resistor R8 of voltage follower U9 form a voltage divider circuit to reduce the input voltage of voltage follower U9. To protect the subsequent analog switches, resistors R3 and R9 are also installed at their outputs. 20 and resistance R 22 .
[0035] (2) The selection module includes a controllable bias voltage. The number of analog switches is equal to the number of decision branches. Two resistive switches are denoted as S1 and S2. The control terminals of analog switches S1 and S2 are connected one-to-one to the output terminals of comparators U3 and U9. The input terminals of all analog switches are connected to a controllable bias voltage. Grounding.
[0036] Its working principle is: the corresponding analog switch is only turned on when the control terminal is at a high level, thus applying the bias voltage. Connect to subsequent circuits; otherwise, turn off, disconnecting this branch. Through this design, different input voltage ranges will activate different switching combinations, thus determining the amount of voltage injected into the inverting adder. The number of channels (0, 1 or 2).
[0037] Specifically, in this embodiment, all analog switches in the selection module can be integrated into a single switch integrated chip, such as the CD4066 quad bidirectional analog switch, which has four analog switches, sufficient for the use of this embodiment.
[0038] Similarly, to ensure isolation and buffering during signal transmission, the selection module also includes voltage followers equal to the number of analog switches. The two voltage followers are denoted as U5 and U6, respectively. The non-inverting inputs of voltage followers U5 and U6 are connected to pull-down resistors R9 and R1, respectively. 10 Grounding (the CD4066 chip's output low level is not strictly equal to 0V without a grounding resistor, so a pull-down resistor is connected to forcibly pull the voltage to 0V when the chip outputs a low level), voltage followers U5 and U6 are connected between the output terminals of analog switches S1 and S2 and the input terminal of the inverting adder.
[0039] (3) The addition module includes an inverting adder U10 and an input resistor R. 13 The non-inverting input of the inverting adder U10 is connected to a pull-down resistor R. 14 Grounded, the input terminals of the inverting adder U10 are connected to resistor R respectively. 11 and R 12 Connect to the output terminals of analog switches S1 and S2, and simultaneously through the input resistor R 13 The input signal x is connected to the external circuit; the output of the inverting adder U10 is used as the circuit output, and the input resistor and the feedback resistor R of the inverting adder are connected. 15 Used to determine the slope of a piecewise linear function, i.e. .
[0040] In this embodiment, the inverting adder U10 employs a high input impedance, low drift operational amplifier (TL084).
[0041] The adder module also includes an inverting amplifier U12 with a gain of one. The input of the inverting amplifier U12 is connected to the output of the inverting adder U10. The feedback resistor of the inverting amplifier U12 is denoted as R. 17 The non-inverting input is connected to a pull-down resistor R. 18 Grounding. Similarly, to ensure isolation and buffering during signal transmission, the adder module also includes voltage follower U11 and voltage follower U13. The input of voltage follower U11 is connected to the output of inverting adder U10, and its output is connected to the input of inverting amplifier U12. The input of voltage follower U13 is connected to the output of inverting amplifier U12, and its output is used as the final output f(x).
[0042] Based on the above analog circuit, its circuit equation can be expressed as:
[0043]
[0044] In the formula, These are the input resistance and the feedback resistance, respectively. The original input signal, It is a controllable bias voltage. These are the threshold voltages for the two decision branches, respectively.
[0045] The above three-segment function implementation scheme can be directly extended to generate complex nonlinear functions with more segments. The extended circuit is characterized by the following: for each additional segment point, only one TLV3501 comparator needs to be added accordingly, utilizing another unused analog switch channel in the CD4066 chip. The inverting inputs of all newly added comparators are connected to new independent threshold voltages, and their outputs control the newly added analog switches. The outputs of all switches remain connected in parallel to the same input of the inverting adder. At this point, the number of conducting switches will increase stepwise with the increase of the threshold voltage, thereby generating a stepped bias with more plateaus at the output, ultimately synthesizing a linear function with multiple segments. This design allows the number of vortices to be expanded in hardware simply by adding standard components, demonstrating the good scalability and engineering practicality of this module.
[0046] The simulation parameters d and k = 1 for the three-segment piecewise linear function are set to 2. The simulation results are as follows: Figure 2 As shown; in the actual circuit module, External bias voltage The voltage is set to -2V, corresponding to a first threshold of 1V and a second threshold of 3V. This parameter setting corresponds to the simulation. The experimental graph after DC scanning of the module is shown below. Figure 3 As shown in the figure. The performance of the actual circuit is consistent with the simulation results.
[0047] In summary, this invention, based on piecewise linear function theory, constructs a general-purpose analog circuit that can be flexibly configured by an external voltage, and provides a specific circuit structure to achieve this function, enabling the nonlinear function generator to have flexibly adjustable parameters. This architecture is independent of any specific chaotic system. The circuit uses a high-speed comparator and analog switches as the core decision and switching modules, thus possessing characteristics of fast response and precise control. Simultaneously, an adder constructed with a precision operational amplifier enables real-time synthesis of the original signal and a controllable bias, ensuring the continuity of the output function. The circuit's input, control, and output functions are clearly decoupled, facilitating its portability as a general-purpose module. By adjusting the external voltage parameters, the chaotic attractor structure can be directly controlled, greatly simplifying the experimental process for complex dynamic systems and significantly reducing costs compared to digital implementation methods.
[0048] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A general-purpose programmable piecewise linear function analog circuit, characterized in that, This includes a decision module, a selection module, and an addition module; The decision module includes multiple decision branches, each of which includes a comparator and a threshold voltage. The non-inverting input of the comparator is connected to the original input signal, and the inverting input is grounded through the threshold voltage. The threshold voltage is used to determine the segmentation point of the piecewise linear function. The selection module includes a controllable bias voltage and an analog switch equal in number to the decision branch. The control terminals of the analog switches are connected one-to-one to the output terminals of the comparator, and the input terminals of all the analog switches are grounded through the controllable bias voltage. The addition module includes an inverting adder and an input resistor. The input terminal of the inverting adder is connected to the output terminals of all the analog switches, and is also connected to the original input signal through the input resistor. The output terminal of the inverting adder serves as the circuit output. The input resistor and the feedback resistor of the inverting adder are used to determine the slope of the piecewise linear function. Wherein, the piecewise linear function for: ; In the formula, These are the input resistance and the feedback resistance, respectively. The original input signal, It is a controllable bias voltage. These are the threshold voltages for each decision branch. To determine the number of branches, a piecewise linear function is used. The number of segments is .
2. The general-purpose programmable piecewise linear function analog circuit according to claim 1, characterized in that, Each of the aforementioned decision branches also includes voltage follower U1 and voltage follower U3; The input terminal of the voltage follower U1 is connected to the original input signal, and the output terminal is connected to the non-inverting input terminal of the comparator. The input terminal of the voltage follower U3 is connected to the output terminal of the comparator via a voltage divider resistor, and the output terminal is connected to the control terminal of the corresponding analog switch. The output of the comparator is also connected to the power supply VCC through a pull-up resistor and grounded through a filter capacitor. The pull-up resistor, the voltage divider resistor, and the pull-down resistor of the voltage follower U3 constitute a voltage divider circuit to reduce the input and output voltage of the voltage follower U3.
3. The general-purpose programmable piecewise linear function analog circuit according to claim 1, characterized in that, The selection module also includes a number of voltage followers equal to the number of analog switches, and the voltage followers are connected one-to-one between the output terminal of the analog switch and the input terminal of the inverting adder.
4. The general-purpose programmable piecewise linear function analog circuit according to claim 1, characterized in that, All the analog switches in the selection module can be integrated into a single switch integrated chip.
5. The general-purpose programmable piecewise linear function analog circuit according to claim 1, characterized in that, The adder module also includes an inverting amplifier with a gain of one, the input of which is connected to the output of the inverting adder.
6. The general-purpose programmable piecewise linear function analog circuit according to claim 5, characterized in that, The addition module also includes voltage follower U11 and voltage follower U13. The input terminal of voltage follower U11 is connected to the output terminal of the inverting adder, and the output terminal is connected to the input terminal of the inverting amplifier. The input terminal of voltage follower U13 is connected to the output terminal of the inverting amplifier.
7. The general-purpose programmable piecewise linear function analog circuit according to claim 1, characterized in that, The comparator uses a TLV3501 chip.