Let's say I have a microcontroller with an antenna output. The characteristic impedance of the pin for the antenna output is x+jy. I want to then connect it to a 50-ohm antenna.
This is the part that does not make sense to me when I see certain PCBs. If we do not know the characteristic impedance of the MCU's antenna pin, then we should place the matching network (pi filter) as close as possible to the MCU's antenna pin. From my understanding the impedance at C2 should be 50 ohm, hence we try to keep the matching close to the MCU's antenna pin because it does not matter what the characteristic impedance of the MCU's antenna pin is due to the trace from the MCU's antenna pin to C1 is so short. Now since we know at C2 we have 50 ohm, it is very easy to impedace match the trace to 50 ohm.
However, I sometimes see the following PCB setup below. Now to me, this does not make since. If we do not know the characteristic impedance of the MCU's antenna pin then the trace from the MCU's antenna pin to C1 cannot be determined but I see many PCBs pace the matching network close to the antenna rather than the MCU's antenna pin.
Basically in a nutshell, we can determine and control the impedance out of C2 but not from the MCU's antenna pin to C1, so why place the matching network close the antenna rather than the MCU's antenna pin?