Supervised learning with ground truth

Hello everyone
I’m new in Nengo and I have some doubts about a solution I’m trying to solve. First, let me explain the network I’m trying to develop.

This network consists of an ensemble A that represents the input, an ensemble A_learn that learns to represent the ground_truth input node, and an ensemble error that represents the error between A_learn and my ground truth. This approach is based on the example of learning to square the input using the PES learning rule. A figure of the network can be seen below.

I have several experiments with input signals and the ground truth of each signal. The ensemble A (parameters are shown below) represents 90% of my ground truth that I want to learn. So using supervised learning PES I want to learn this network to better represent the ground truth.

Parameters of ensemble A and A_learn:

ens_params = dict(
    dimensions = 1,
    neuron_type=nengo.LIF(tau_rc=0.02, tau_ref=0.002, min_voltage=0, amplitude=1),
    encoders = Choice([[1]]),

I’m trying to do the learning of the network with this way, but I’m not sure of this is the best approach to solve this problem.

Any comments/suggestions/ideas are welcome!