In order to try explaining the present accelerated expansion of the universe, we consider the most complete noncommutativity, of a certain type, in a Friedmann–Robertson–Walker cosmological model, coupled to a perfect fluid. We use the ADM formalism in order to write the gravitational Hamiltonian of the model and the Schutz’s formalism in order to write the perfect fluid Hamiltonian. The noncommutativity is introduced by four nontrivial Poisson brackets between all geometrical as well as matter variables of the model. Each nontrivial Poisson bracket is associated with a noncommutative parameter. We recover the description in terms of commutative variables by introducing four variables transformations that depend on the noncommutative parameters. Using those variables transformations, we rewrite the total noncommutative Hamiltonian of the model in terms of commutative variables. From the resulting Hamiltonian, we obtain the scale factor dynamical equations for a generic perfect fluid. In order to solve these equations, we restrict our attention to a model where the perfect fluid is radiation. The solutions depend on six parameters: the four noncommutative parameters, a parameter associated with the fluid energy C, and the curvature parameter k. They also depend on the initial conditions of the model variables. We compare the noncommutative solutions to the corresponding commutative ones and determine how the former ones differ from the latter ones. The comparison shows that the noncommutative model is very useful for describing the accelerated expansion of the universe. We also obtain estimates for one of the noncommutative parameters.