Separation of signals without loss of information about the signals themselves There is a signal that contains:


Rectangular pulses on frequency of 1 kHz
Rectangular pulses on frequency of 1.4 kHz
Other noises.


Required:


Separate 1kHz pulses from everything else and measure their amplitude and duration
Separate 1.4kHz pulses from everything else and measure their amplitude and duration


Was tried:


Use a positive IIR filter of the 6th order (at a frequency of 1kHz and at a frequency of 1.4kHz). After the filter, information about the initial amplitude and duration was completely lost.
Use comb filter. The output signal is smeared due to the mismatch of the input signal period and the filter period.
Searching and asking a question in my native language (Russian) did not help. I did not find any examples. The only possible solution proposed was the use of correlation analysis. But I could not work out, how to use it for solving my problem, again there was not a single explanation or example.


P.S. I’ve already asked this question, but maybe I wrote something that is not clear (I am not a native speaker of English), please ask, I will try to explain more clearly. I have one last hope on the international site that someone has faced this problem and will be able to share a solution or explain how to solve it. Thank you very much in advance!

P.S.S


  why do you want to filter? your signals look clean


In that question, the picture was just for example. In this question, the picture looks like my real signal.


  Yeah, classical XY problem: You're asking a strange question (you want to filter, but you want to have none of the effects of filtering?) without telling us why you want to do it, for what purpose, in what greater context.


In this thread, I tried to describe in more detail what I want.


  If I understand correctly and you want a system that picks some pulses and rejects others based on their fundamental period: a filter is not going to do it, at least not by itself.


I need to separate the 1 kHz pulses from everything else and measure their amplitude and duration, and then separate the 1.4 kHz pulses from everything else and measure their amplitude and duration.


  Does the amplitude stay constant for the duration of the pulse groups? Do you have a subset of possible pulse groups: number of pulses at the 1.4 KHz rate, number of pulses at the 1KHz rate? Please provide all info in terms of what these pulses are doing and why you are doing this may also help answer those questions you may not be sure how to ask. The sentence "at certain points in time it can change by 200 us..." was particularly confusing- what is "It", the duration? What does it mean for the duration to change by 200 us, increase to 300 us? 


No, the amplitude can vary. I tried to describe everything in more detail in this topic.


  Do the pulses add (i.e., if a 1.4kHz pulse and a 1kHz pulse land on top of each other is the result the sum of the pulse heights)? Do you have to catch each and every pulse, or can you miss some? 


Yes, when they fall on each other it will be the sum of the heights. The signal above shows this. In the ideal case, I would like to catch every impulse, but in fact you can also skip.
This is probably going to take multiple steps.  As a start, here is what I'd do:


You want a filter that retains pulse information, but filters noise.  The most extreme you can do with this is a rectangular filter that's $100\mu\mathrm{s}$ long, or possibly a raised-cosine filter that's about the same length.
Assuming that the pulse timing is very consistent, phase lock to each pulse train.  This means you have one 1kHz PLL, and one 1.4kHz PLL.  When you get ready for this step you may want to ask a separate question, but if your pulses always start with the same timing (i.e., if a "long" pulse just ends $100\mu\mathrm{s}$ later than "normal") then you can lock onto the leading edge of each pulse.
Any time the PLL phases indicate a pulse will overlap, ignore both -- basically, output "null" on both channels.  You probably need to allow room for those $200\mu\mathrm{s}$ pulses you speak of.
Detect long pulses by looking for unexpected energy $100\mu\mathrm{s}$ later than the expected center of the filter output.
Detect pulse height by looking at the height of the filtered pulse where the PLL tells you.


The very beginning part of development for this would be to record your data into a file so you can play with it, run it through your best guess at a matched filter, and look at it.