1460736528-73835c1d-d039-4cea-9381-25bb18d8f3c8

1. A method for providing automatic gain control of a multi-stage system, comprising:
defining at least one parameter associated with at least some of a plurality of gain stages of the multi-stage system;
selecting an order for training the plurality of stages based on relative noise dominance for the plurality of stages;
for a given stage of the plurality of stages selected according to the selected order, at least one given stage comprising an analog equalizer having a programmable gain setting which can vary as a function of frequency;
training the analog equalizer stage using a criterion based on power gain;
measuring output signals of the multi-stage system over a plurality of gain settings for the given stage; and
configuring a gain setting of the given stage of the multi-stage system based on the measured output signals relative to the at least one parameter defined for the given stage, wherein the defined parameter for the analog equalizer comprising a maximum gain limit.
2. The method of claim 1, wherein the measuring and the configuring are performed for each of the plurality of stages according to the selected order.
3. The method of claim 2, wherein the configuring is performed to distribute gain among the plurality of stages according to a relative effectiveness of each of the plurality of stages to reduce noise in a path that includes the multi-stage system.
4. The method of claim 1, wherein the maximum gain limit is determined based on simulations performed on a design of the multi-stage system over a plurality of test cases, the maximum gain limit being operative to at least one of maximize the hardware capacity and mitigate part-to-part variations of the multi-stage system.
5. The method of claim 1, wherein the measuring and configuring further comprise:
incrementing the gain setting of the analog equalizer to a next gain setting;
measuring the output signal values of the multi-stage system over a plurality of frames;
determining an average signal value for the multi-stage system based on the measured signal values for the analog equalizer at the next gain setting;
comparing the maximum gain limit relative to a value functionally related to the average signal value; and
setting at least one of the gain setting and a channel slope of the analog equalizer based on the comparison.
6. The method of claim 5, wherein the value functionally related to the average signal value comprises a logarithmic function proportional to the average signal value associated with the next gain setting and an average signal value of the multistage system associated with the plurality of stages when set at respective minimum gain settings.
7. The method of claim 1, wherein the given stage further comprises at least one other gain stage having a programmable gain setting, the defined parameter for the at least one other gain stage comprising a target threshold value for the output signal.
8. The method of claim 7, wherein the target threshold comprises a target RMS (root mean square) threshold for the output signal.
9. The method of claim 7, wherein the measuring and configuring further comprise:
measuring RMS (root mean square) signal values for the output signals of the multi-stage system over a plurality of frames for at least a portion of the plurality of gain settings of the at least one other gain stage;
determining average RMS values for the output signals associated with each of the at least a portion of the plurality of gain settings; and
setting the gain setting of the at least one other gain stage based on the average RMS values relative to the target threshold value.
10. A digital signal processor programmed to perform an automatic gain control algorithm for a plurality of gain stages of a multi-stage gain system, the automatic gain control algorithm comprising:
selecting an order for training the plurality of stages of the multi-stage system based on relative noise dominance among the plurality of stages;
configuring each of the plurality of stages according to the selected order, the configuring of a given stage of the plurality of stages, wherein at least one given stage comprising an analog equalizer having a programmable gain setting which can vary as a function of frequency, comprising:
training the analog equalizer stage using a criterion based on power gain;
incrementing a gain setting for the given stage;
measuring output signals over a plurality of frames at the incremented gain setting of the given stage;
evaluating the measured output signals relative to a parameter limit defined for the given stage for the incremented gain setting for the given stage, wherein the predetermined parameter limit associated with the analog equalizer comprising a maximum gain limit;
repeating the incrementing, measuring and evaluating for a next gain setting of the given stage based on the evaluation; and
setting the gain setting of the given stage based on determining that the incremented gain setting affords a maximum hardware capacity for the given stage.
11. The digital signal processor of claim 10, wherein the configuring of the analog equalizer further comprise:
measuring output signal values of the multi-stage system over a plurality of frames for the incremented gain setting of the analog equalizer;
determining an average output signal value for the multi-stage system based on the measured output signal values associated with the incremented gain setting of the analog equalizer;
comparing the maximum gain limit relative to a value functionally related to the average signal value; and
setting the gain setting of the analog equalizer based on the comparison.
12. The digital signal processor of claim 11, wherein, prior to the configuring of the given stage, the automatic gain control algorithm further comprises:
measuring output signal values of the multi-stage system over a plurality of frames with the plurality of stages at respective initial gain settings; and
determining an average signal value of the multi-stage system for the initialized gain settings, the value functionally related to the average signal value comprising a logarithmic function comprising a ratio of the average signal value of the multi-stage system associated with the incremented gain setting of the analog equalizer and the average signal value of the multi-stage system associated with the initial gain settings.
13. The digital signal processor of claim 11, wherein the given stage further comprises at least one programmable gain amplifier having a programmable gain setting, the parameter limit for the at least one programmable gain amplifier comprising a target threshold value for the output signal.
14. The digital signal processor of claim 10, wherein the given stage further comprises at least one programmable gain amplifier having a programmable gain setting, the parameter limit for the at least one programmable gain amplifier comprising a target threshold value for the output signal.
15. The digital signal processor of claim 14, wherein the target threshold comprises a target value for the output signal of the multi-stage gain system.
16. The digital signal processor of claim 14, wherein the configuring of the at least one programmable gain amplifier further comprises:
measuring output signal RMS (root mean square) values of the multi-stage system over a plurality of frames for at least a portion of the plurality of gain settings of the at least one programmable gain amplifier;
determining an average RMS value for the output signal associated with each of the at least a portion of the plurality of gain settings; and
setting the gain setting of the at least one programmable gain amplifier based on the average RMS value relative to the target threshold value.
17. The digital signal processor of claim 10, wherein the gain setting of each of the plurality of stages is set so that gain is distributed among the plurality of stages according to a relative effectiveness of each of the plurality of stages to reduce noise in a path that includes the multi-stage gain system.
18. A programmable gain system, comprising:
a plurality of serially coupled stages, each of the plurality of gain stages having an associated programmable gain setting, wherein at least one of the plurality of pain stages comprises an analog equalizer having a programmable gain setting which can vary as a function of frequency and at least one other stage of the plurality of gain stages comprises a programmable gain amplifier; and
a control system that, during a training phase, sets the associated gain setting of each of the plurality of gain stages in an order, the associated gain setting being set to maximize hardware capacity and to mitigate part-to-part variation in the gain system based on at least one predetermined parameter, the pain the analog equalizer stage is set using a criterion based on power gain.
19. The programmable gain system of claim 18, wherein the control system comprises a digital signal processor programmed with an automatic gain control algorithm to set the associated gain settings of the plurality of gain stages, the automatic gain control algorithm operating to set the gain of each stage in the order, which is determined according to relative noise dominance of the plurality of gain stages.
20. The programmable gain system of claim 19, further comprising a switch system that includes at least one switch connected to at least one node along a path defined by the plurality of gain stages, the digital signal processor controlling the switch system for, according to the automatic gain control algorithm, measuring signal characteristics of a selected portion of the path during the training phase.
21. The programmable gain system of claim 19, further comprising at least one analog filter interleaved in a path that includes the plurality of gain stages.
22. The programmable gain system of claim 19, wherein the at least one parameter associated with the analog equalizer comprises a maximum gain limit for the analog equalizer that affords substantially maximum hardware capacity with reduced part-to-part variations for the gain system.
23. The programmable gain system of claim 22, wherein the digital signal processor employs the automatic gain control algorithm to configure the analog equalizer by performing a method that comprises:
incrementing a gain setting for the analog equalizer;
measuring output signal values of the multi-stage system over a plurality of frames for the incremented gain setting of the analog equalizer;
determining an average signal value for the multi-stage system based on the measured signal values associated with the incremented gain setting of the analog equalizer;
comparing the maximum gain limit relative to a value functionally related to the average signal value associated with the incremented gain setting of the analog equalizer; and
setting the gain setting of the analog equalizer based on the comparison.
24. The programmable gain system of claim 23, wherein, prior to setting the associated gain settings of the plurality of gain stages, the automatic gain control algorithm performing a method that further comprises:
measuring output signal values of the multi-stage system over a plurality of frames with the plurality of gain stages set at respective initial gain settings; and
determining an average signal value of the multi-stage system for the initial gain settings of the plurality of gain stages, wherein the value functionally related to the average signal value further comprises a logarithmic function comprising a ratio of the average signal value of the multi-stage system associated with the incremented gain setting of the analog equalizer and the average signal value of the multi-stage system associated with the initial gain settings of the plurality of gain stages.
25. The programmable gain system of claim 24, wherein the initial gain settings of the plurality of gain stages further comprise minimum gain settings for each of the plurality of gain stages.
26. The programmable gain system of claim 19, wherein the digital signal processor employs the automatic gain control algorithm to configure the at least one other gain stage by performing a method that comprises:
measuring output signal RMS (root mean square) values of the multi-stage system over a plurality of frames for at least a portion of the plurality of gain settings of the at least one other gain stage;
determining an average RMS value for the output signal associated with each of the at least a portion of the plurality of gain settings; and
setting the gain setting of the at least one other gain stage based on the average RMS value relative to a target threshold value.
27. The programmable gain system of claim 26, wherein the target threshold value comprises a target RMS value for the output signal.
28. The programmable gain system of claim 19, wherein the automatic gain control algorithm is operative to configure each given stage of the plurality of gain stages according to the order by performing a method that comprises:
incrementing a gain setting for the given stage;
measuring output signals for a plurality of frames with the given stage at the incremented gain setting;
determining whether the incremented gain setting provides a maximum hardware capacity that mitigates part-to-part variations based on the measured output signals relative to the at least one predetermined parameter defined for the given stage;
repeating the incrementing, measuring and determining for a next gain setting of the given stage based on determining that the incremented gain setting does not provide at least the maximum hardware capacity for the given stage; and
setting the gain setting of the given stage based on determining that the incremented gain setting provides at least the maximum hardware capacity for the given stage.

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 device for delivery of medicament, comprising:
a main housing;
a multi-chamber container, comprising a first chamber containing a diluent, a second chamber containing a medicament agent, a bypass channel, an outlet provided with a mechanism to be connected to a medicament delivery member, and at least one longitudinally movable plunger;
a pre-treating arrangement acting on at least one longitudinally movable plunger for mixing the medicament agent with the diluent and obtaining a mixed medicament;
a drive force mechanism configured to act on a longitudinally movable plunger rod capable of exerting a force on the container for delivering the mixed medicament; and
an activating delivery mechanism configured to act on the drive force mechanism for initiating the delivering of medicament via the medicament delivery member;
wherein the pre-treating arrangement comprises a clickable mechanism resiliently and operably connected to a longitudinally movable second rod that is partially and slidably arranged inside the longitudinally movable plunger rod such that the clickable mechanism is adapted to be manually and intermittently activated for stepwise pushing the second rod inside the container and thereby mixing the medicament agent with the diluent.
2. The device of claim 1, wherein the clickable mechanism comprises a pre-treating sleeve and a resilient device, and the pre-treating sleeve is adapted to be manually activated from a non-depressed position to a depressed position against a counteracting force from the resilient device such that when the pre-treating sleeve is activated from the non-depressed position to the depressed position, the second rod is pushed one step inside the container and the pre-treating sleeve is restored to its non-depressed position.
3. The device of claim 2, wherein the pre-treating sleeve comprises inwardly flexible tongues arranged to interact with a ratchet having a predetermined number of steps arranged on the longitudinally movable second rod, and a last step of the ratchet is arranged for priming the container.
4. The device of claim 1, wherein the clickable mechanism comprises a delay device arranged around the clickable mechanism and configured to delay intermittent pushing of the second rod.
5. The device of claim 1, wherein the pre-treating arrangement further comprises a blocking mechanism that is operably interconnected to the clickable mechanism and that permits activation of the clickable mechanism only when the device is substantially vertical with the medicament delivery member in a specific direction.
6. The device of claim 5, wherein for an injection device, the medicament delivery member is directed upward.
7. The device of claims 5, wherein the blocking mechanism comprises a cylindrical sleeve, a cylindrical wall arranged on an inner surface of the main housing, and an obstruction device; and inner surfaces of the blocking mechanism are arranged to interact with the clickable mechanism.
8. The device of claim 7, wherein when the device is held substantially vertical, the obstruction device is an intermediate in an interaction between the blocking mechanism and the pre-treating sleeve.
9. The device of claim 1, further comprising a dose setting mechanism that is arranged to interact with the drive force mechanism and that sets a predetermined dose to be delivered.
10. The device of claim 1, wherein the activating delivery mechanism is configured to extend around the medicament delivery member upon withdrawal of the device from a delivery site.
11. The device of claim 10, wherein for injection devices, the activating delivery mechanism is configured to lockingly cover the needle after use.
12. The device of claim 1, wherein the medicament delivery member is configured as a mouth piece or a nasal piece.
13. The device of claim 1, wherein the medicament delivery member is configured as a nozzle, whereby the predetermined dose of medicament is sprayed into an eye or onto a skin of a patient.
14. The device of claim 1, wherein the medicament delivery member is configured as a member that introduces the predetermined dose of medicament to an eye of a patient as at least one drop.
15. The device of claim 1, wherein the medicament delivery member is configured as a needle for injection of the predetermined dose of medicament into a body of a patient.